当前位置: 首页>>代码示例>>C++>>正文


C++ CompositorParent类代码示例

本文整理汇总了C++中CompositorParent的典型用法代码示例。如果您正苦于以下问题:C++ CompositorParent类的具体用法?C++ CompositorParent怎么用?C++ CompositorParent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了CompositorParent类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: APZController

CompositorParent* MetroWidget::NewCompositorParent(int aSurfaceWidth, int aSurfaceHeight)
{
  CompositorParent *compositor = nsBaseWidget::NewCompositorParent(aSurfaceWidth, aSurfaceHeight);

  if (ShouldUseAPZC()) {
    mRootLayerTreeId = compositor->RootLayerTreeId();

    mController = new APZController();
    mController->SetWidgetListener(mWidgetListener);

    CompositorParent::SetControllerForLayerTree(mRootLayerTreeId, mController);

    APZController::sAPZC = CompositorParent::GetAPZCTreeManager(compositor->RootLayerTreeId());
    APZController::sAPZC->SetDPI(GetDPI());

    nsresult rv;
    nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1", &rv);
    if (NS_SUCCEEDED(rv)) {
      observerService->AddObserver(this, "apzc-scroll-offset-changed", false);
      observerService->AddObserver(this, "Metro:ZoomToRect", false);
    }
  }

  return compositor;
}
开发者ID:tmeshkova,项目名称:mozilla-central,代码行数:25,代码来源:MetroWidget.cpp

示例2: ScheduleComposition

bool ScheduleComposition(const T& op)
{
  CompositableHost* comp = AsCompositable(op);
  uint64_t id = comp->GetCompositorID();
  if (!comp || !id) {
    return false;
  }
  CompositorParent* cp = CompositorParent::GetCompositor(id);
  if (!cp) {
    return false;
  }
  cp->ScheduleComposition();
  return true;
}
开发者ID:bebef1987,项目名称:gecko-dev,代码行数:14,代码来源:CompositableTransactionParent.cpp

示例3: ScheduleComposition

bool ScheduleComposition(const T& op)
{
  CompositableParent* comp = static_cast<CompositableParent*>(op.compositableParent());
  if (!comp || !comp->GetCompositorID()) {
    return false;
  }
  CompositorParent* cp
    = CompositorParent::GetCompositor(comp->GetCompositorID());
  if (!cp) {
    return false;
  }
  cp->ScheduleComposition();
  return true;
}
开发者ID:PatMart,项目名称:gecko-dev,代码行数:14,代码来源:CompositableTransactionParent.cpp

示例4: SharedImage

bool ImageContainerParent::RecvPublishImage(const SharedImage& aImage)
{
  SharedImage *copy = new SharedImage(aImage);
  SharedImage *prevImage = SwapSharedImage(mID, copy);

  PRUint32 compositorID = GetCompositorIDForImage(mID);
  CompositorParent* compositor = CompositorParent::GetCompositor(compositorID);

  if (compositor) {
    compositor->ScheduleComposition();
  }

  if (prevImage && !mStop) {
    SendReturnImage(*prevImage);
    delete prevImage;
  }
  return true;
}
开发者ID:eric30,项目名称:mozilla-central-1,代码行数:18,代码来源:ImageContainerParent.cpp


注:本文中的CompositorParent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。