コード例 #1
0
 public void startAnimation(CanvasAnimation animation) {
   GLRoot root = getGLRoot();
   if (root == null) throw new IllegalStateException();
   mAnimation = animation;
   if (mAnimation != null) {
     mAnimation.start();
     root.registerLaunchedAnimation(mAnimation);
   }
   invalidate();
 }
コード例 #2
0
 // Request re-layout of the view hierarchy.
 public void requestLayout() {
   mViewFlags |= FLAG_LAYOUT_REQUESTED;
   mLastHeightSpec = -1;
   mLastWidthSpec = -1;
   if (mParent != null) {
     mParent.requestLayout();
   } else {
     // Is this a content pane ?
     GLRoot root = getGLRoot();
     if (root != null) root.requestLayoutContentPane();
   }
 }
  public static void prepareFadeOutTexture(
      final AbstractGalleryActivity activity, final GLView rootPane) {
    final PreparePageFadeoutTexture task = new PreparePageFadeoutTexture(rootPane);
    if (task.isCancelled()) return;
    final GLRoot root = activity.getGLRoot();
    RawTexture texture = null;
    root.unlockRenderThread();
    try {
      root.addOnGLIdleListener(task);
      texture = task.get();
    } finally {
      root.lockRenderThread();
    }

    if (texture == null) return;
    activity.getTransitionStore().put(KEY_FADE_TEXTURE, texture);
  }
コード例 #4
0
 public void unlockRendering() {
   if (mRoot != null) {
     mRoot.unlockRenderThread();
   }
 }
コード例 #5
0
 // Request re-rendering of the view hierarchy.
 // This is used for animation or when the contents changed.
 public void invalidate() {
   GLRoot root = getGLRoot();
   if (root != null) root.requestRender();
 }