Loading core/java/android/view/TextureView.java +4 −0 Original line number Diff line number Diff line Loading @@ -206,6 +206,7 @@ public class TextureView extends View { */ public TextureView(@NonNull Context context) { super(context); mRenderNode.setIsTextureView(); } /** Loading @@ -216,6 +217,7 @@ public class TextureView extends View { */ public TextureView(@NonNull Context context, @Nullable AttributeSet attrs) { super(context, attrs); mRenderNode.setIsTextureView(); } /** Loading @@ -229,6 +231,7 @@ public class TextureView extends View { */ public TextureView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mRenderNode.setIsTextureView(); } /** Loading @@ -247,6 +250,7 @@ public class TextureView extends View { public TextureView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); mRenderNode.setIsTextureView(); } /** Loading graphics/java/android/graphics/RenderNode.java +13 −0 Original line number Diff line number Diff line Loading @@ -1561,6 +1561,16 @@ public final class RenderNode { return nGetUniqueId(mNativeRenderNode); } /** * Captures whether this RenderNote represents a TextureView * TODO(b/281695725): Clean this up once TextureView use setFrameRate API * * @hide */ public void setIsTextureView() { nSetIsTextureView(mNativeRenderNode); } /////////////////////////////////////////////////////////////////////////// // Animations /////////////////////////////////////////////////////////////////////////// Loading Loading @@ -1891,4 +1901,7 @@ public final class RenderNode { @CriticalNative private static native long nGetUniqueId(long renderNode); @CriticalNative private static native void nSetIsTextureView(long renderNode); } libs/hwui/RenderNode.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -152,6 +152,9 @@ void RenderNode::damageSelf(TreeInfo& info) { // TODO: Get this from the display list ops or something info.damageAccumulator->dirty(DIRTY_MIN, DIRTY_MIN, DIRTY_MAX, DIRTY_MAX); } if (!mIsTextureView) { info.out.solelyTextureViewUpdates = false; } } } Loading libs/hwui/RenderNode.h +4 −0 Original line number Diff line number Diff line Loading @@ -221,6 +221,8 @@ public: int64_t uniqueId() const { return mUniqueId; } void setIsTextureView() { mIsTextureView = true; } void markDrawStart(SkCanvas& canvas); void markDrawEnd(SkCanvas& canvas); Loading Loading @@ -290,6 +292,8 @@ private: bool mHasHolePunches; StretchMask mStretchMask; bool mIsTextureView = false; // METHODS & FIELDS ONLY USED BY THE SKIA RENDERER public: /** Loading libs/hwui/TreeInfo.h +4 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,10 @@ public: // This is used to post a message to redraw when it is time to draw the // next frame of an AnimatedImageDrawable. nsecs_t animatedImageDelay = kNoAnimatedImageDelay; // This is used to determine if there were only TextureView updates in this frame. // This info is passed to SurfaceFlinger to determine whether it should use vsyncIds // for refresh rate selection. bool solelyTextureViewUpdates = true; } out; // This flag helps to disable projection for receiver nodes that do not have any backward Loading Loading
core/java/android/view/TextureView.java +4 −0 Original line number Diff line number Diff line Loading @@ -206,6 +206,7 @@ public class TextureView extends View { */ public TextureView(@NonNull Context context) { super(context); mRenderNode.setIsTextureView(); } /** Loading @@ -216,6 +217,7 @@ public class TextureView extends View { */ public TextureView(@NonNull Context context, @Nullable AttributeSet attrs) { super(context, attrs); mRenderNode.setIsTextureView(); } /** Loading @@ -229,6 +231,7 @@ public class TextureView extends View { */ public TextureView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mRenderNode.setIsTextureView(); } /** Loading @@ -247,6 +250,7 @@ public class TextureView extends View { public TextureView(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) { super(context, attrs, defStyleAttr, defStyleRes); mRenderNode.setIsTextureView(); } /** Loading
graphics/java/android/graphics/RenderNode.java +13 −0 Original line number Diff line number Diff line Loading @@ -1561,6 +1561,16 @@ public final class RenderNode { return nGetUniqueId(mNativeRenderNode); } /** * Captures whether this RenderNote represents a TextureView * TODO(b/281695725): Clean this up once TextureView use setFrameRate API * * @hide */ public void setIsTextureView() { nSetIsTextureView(mNativeRenderNode); } /////////////////////////////////////////////////////////////////////////// // Animations /////////////////////////////////////////////////////////////////////////// Loading Loading @@ -1891,4 +1901,7 @@ public final class RenderNode { @CriticalNative private static native long nGetUniqueId(long renderNode); @CriticalNative private static native void nSetIsTextureView(long renderNode); }
libs/hwui/RenderNode.cpp +3 −0 Original line number Diff line number Diff line Loading @@ -152,6 +152,9 @@ void RenderNode::damageSelf(TreeInfo& info) { // TODO: Get this from the display list ops or something info.damageAccumulator->dirty(DIRTY_MIN, DIRTY_MIN, DIRTY_MAX, DIRTY_MAX); } if (!mIsTextureView) { info.out.solelyTextureViewUpdates = false; } } } Loading
libs/hwui/RenderNode.h +4 −0 Original line number Diff line number Diff line Loading @@ -221,6 +221,8 @@ public: int64_t uniqueId() const { return mUniqueId; } void setIsTextureView() { mIsTextureView = true; } void markDrawStart(SkCanvas& canvas); void markDrawEnd(SkCanvas& canvas); Loading Loading @@ -290,6 +292,8 @@ private: bool mHasHolePunches; StretchMask mStretchMask; bool mIsTextureView = false; // METHODS & FIELDS ONLY USED BY THE SKIA RENDERER public: /** Loading
libs/hwui/TreeInfo.h +4 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,10 @@ public: // This is used to post a message to redraw when it is time to draw the // next frame of an AnimatedImageDrawable. nsecs_t animatedImageDelay = kNoAnimatedImageDelay; // This is used to determine if there were only TextureView updates in this frame. // This info is passed to SurfaceFlinger to determine whether it should use vsyncIds // for refresh rate selection. bool solelyTextureViewUpdates = true; } out; // This flag helps to disable projection for receiver nodes that do not have any backward Loading