Loading apct-tests/perftests/core/src/android/graphics/perftests/RenderNodePerfTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ public class RenderNodePerfTest { final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); RenderNode node = RenderNode.create("LinearLayout", null); while (state.keepRunning()) { node.startRecording(100, 100); node.beginRecording(100, 100); node.endRecording(); } } Loading @@ -86,7 +86,7 @@ public class RenderNodePerfTest { while (state.keepRunning()) { for (int i = 0; i < nodes.length; i++) { nodes[i].startRecording(100, 100); nodes[i].beginRecording(100, 100); } for (int i = nodes.length - 1; i >= 0; i--) { nodes[i].endRecording(); Loading apct-tests/perftests/core/src/android/text/StaticLayoutPerfTest.java +9 −9 Original line number Diff line number Diff line Loading @@ -265,7 +265,7 @@ public class StaticLayoutPerfTest { state.pauseTiming(); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); state.resumeTiming(); layout.draw(c); Loading @@ -282,7 +282,7 @@ public class StaticLayoutPerfTest { final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); state.resumeTiming(); layout.draw(c); Loading @@ -299,7 +299,7 @@ public class StaticLayoutPerfTest { final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); state.resumeTiming(); layout.draw(c); Loading @@ -316,7 +316,7 @@ public class StaticLayoutPerfTest { final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); Canvas.freeTextLayoutCaches(); state.resumeTiming(); Loading @@ -334,7 +334,7 @@ public class StaticLayoutPerfTest { final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); Canvas.freeTextLayoutCaches(); state.resumeTiming(); Loading @@ -353,7 +353,7 @@ public class StaticLayoutPerfTest { mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT), PAINT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); state.resumeTiming(); layout.draw(c); Loading @@ -371,7 +371,7 @@ public class StaticLayoutPerfTest { mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); state.resumeTiming(); layout.draw(c); Loading @@ -389,7 +389,7 @@ public class StaticLayoutPerfTest { mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT), PAINT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); Canvas.freeTextLayoutCaches(); state.resumeTiming(); Loading @@ -408,7 +408,7 @@ public class StaticLayoutPerfTest { mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); Canvas.freeTextLayoutCaches(); state.resumeTiming(); Loading apct-tests/perftests/core/src/android/widget/TextViewPrecomputedTextPerfTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -344,7 +344,7 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.startRecording( final RecordingCanvas c = node.beginRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Loading @@ -371,7 +371,7 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.startRecording( final RecordingCanvas c = node.beginRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Loading Loading @@ -400,7 +400,7 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.startRecording( final RecordingCanvas c = node.beginRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Loading Loading @@ -430,7 +430,7 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.startRecording( final RecordingCanvas c = node.beginRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Loading api/current.txt +14 −17 Original line number Diff line number Diff line Loading @@ -14946,13 +14946,15 @@ package android.graphics { public final class RenderNode { ctor public RenderNode(@Nullable String); method public int computeApproximateMemoryUsage(); method public android.graphics.RecordingCanvas beginRecording(int, int); method public android.graphics.RecordingCanvas beginRecording(); method public long computeApproximateMemoryUsage(); method public void discardDisplayList(); method public void endRecording(); method public float getAlpha(); method public int getAmbientShadowColor(); method @ColorInt public int getAmbientShadowColor(); method public int getBottom(); method public float getCameraDistance(); method @FloatRange(from=0.0f, to=java.lang.Float.MAX_VALUE) public float getCameraDistance(); method public boolean getClipToBounds(); method public boolean getClipToOutline(); method public float getElevation(); Loading @@ -14963,12 +14965,12 @@ package android.graphics { method public float getPivotX(); method public float getPivotY(); method public int getRight(); method public float getRotation(); method public float getRotationX(); method public float getRotationY(); method public float getRotationZ(); method public float getScaleX(); method public float getScaleY(); method public int getSpotShadowColor(); method @ColorInt public int getSpotShadowColor(); method public int getTop(); method public float getTranslationX(); method public float getTranslationY(); Loading @@ -14986,36 +14988,31 @@ package android.graphics { method public boolean offsetTopAndBottom(int); method public boolean resetPivot(); method public boolean setAlpha(float); method public boolean setAmbientShadowColor(int); method public boolean setBottom(int); method public boolean setCameraDistance(float); method public boolean setClipBounds(@Nullable android.graphics.Rect); method public boolean setAmbientShadowColor(@ColorInt int); method public boolean setCameraDistance(@FloatRange(from=0.0f, to=java.lang.Float.MAX_VALUE) float); method public boolean setClipRect(@Nullable android.graphics.Rect); method public boolean setClipToBounds(boolean); method public boolean setClipToOutline(boolean); method public boolean setElevation(float); method public boolean setForceDarkAllowed(boolean); method public boolean setHasOverlappingRendering(boolean); method public boolean setLeft(int); method public boolean setLeftTopRightBottom(int, int, int, int); method public boolean setOutline(@Nullable android.graphics.Outline); method public boolean setPivotX(float); method public boolean setPivotY(float); method public boolean setPosition(int, int, int, int); method public boolean setPosition(android.graphics.Rect); method public boolean setProjectBackwards(boolean); method public boolean setProjectionReceiver(boolean); method public boolean setRight(int); method public boolean setRotation(float); method public boolean setRotationX(float); method public boolean setRotationY(float); method public boolean setRotationZ(float); method public boolean setScaleX(float); method public boolean setScaleY(float); method public boolean setSpotShadowColor(int); method public boolean setTop(int); method public boolean setSpotShadowColor(@ColorInt int); method public boolean setTranslationX(float); method public boolean setTranslationY(float); method public boolean setTranslationZ(float); method public boolean setUseCompositingLayer(boolean, @Nullable android.graphics.Paint); method public android.graphics.RecordingCanvas startRecording(int, int); method public android.graphics.RecordingCanvas startRecording(); } public class Shader { core/java/android/view/Surface.java +2 −2 Original line number Diff line number Diff line Loading @@ -922,7 +922,7 @@ public class Surface implements Parcelable { if (mCanvas != null) { throw new IllegalStateException("Surface was already locked!"); } mCanvas = mRenderNode.start(width, height); mCanvas = mRenderNode.beginRecording(width, height); return mCanvas; } Loading @@ -931,7 +931,7 @@ public class Surface implements Parcelable { throw new IllegalArgumentException("canvas object must be the same instance that " + "was previously returned by lockCanvas"); } mRenderNode.end(mCanvas); mRenderNode.endRecording(); mCanvas = null; nHwuiDraw(mHwuiRenderer); } Loading Loading
apct-tests/perftests/core/src/android/graphics/perftests/RenderNodePerfTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -71,7 +71,7 @@ public class RenderNodePerfTest { final BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); RenderNode node = RenderNode.create("LinearLayout", null); while (state.keepRunning()) { node.startRecording(100, 100); node.beginRecording(100, 100); node.endRecording(); } } Loading @@ -86,7 +86,7 @@ public class RenderNodePerfTest { while (state.keepRunning()) { for (int i = 0; i < nodes.length; i++) { nodes[i].startRecording(100, 100); nodes[i].beginRecording(100, 100); } for (int i = nodes.length - 1; i >= 0; i--) { nodes[i].endRecording(); Loading
apct-tests/perftests/core/src/android/text/StaticLayoutPerfTest.java +9 −9 Original line number Diff line number Diff line Loading @@ -265,7 +265,7 @@ public class StaticLayoutPerfTest { state.pauseTiming(); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); state.resumeTiming(); layout.draw(c); Loading @@ -282,7 +282,7 @@ public class StaticLayoutPerfTest { final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); state.resumeTiming(); layout.draw(c); Loading @@ -299,7 +299,7 @@ public class StaticLayoutPerfTest { final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); state.resumeTiming(); layout.draw(c); Loading @@ -316,7 +316,7 @@ public class StaticLayoutPerfTest { final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); Canvas.freeTextLayoutCaches(); state.resumeTiming(); Loading @@ -334,7 +334,7 @@ public class StaticLayoutPerfTest { final CharSequence text = mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); Canvas.freeTextLayoutCaches(); state.resumeTiming(); Loading @@ -353,7 +353,7 @@ public class StaticLayoutPerfTest { mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT), PAINT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); state.resumeTiming(); layout.draw(c); Loading @@ -371,7 +371,7 @@ public class StaticLayoutPerfTest { mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); state.resumeTiming(); layout.draw(c); Loading @@ -389,7 +389,7 @@ public class StaticLayoutPerfTest { mTextUtil.nextRandomParagraph(WORD_LENGTH, STYLE_TEXT), PAINT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); Canvas.freeTextLayoutCaches(); state.resumeTiming(); Loading @@ -408,7 +408,7 @@ public class StaticLayoutPerfTest { mTextUtil.nextRandomParagraph(WORD_LENGTH, NO_STYLE_TEXT), PAINT); final StaticLayout layout = StaticLayout.Builder.obtain(text, 0, text.length(), PAINT, TEXT_WIDTH).build(); final RecordingCanvas c = node.startRecording(1200, 200); final RecordingCanvas c = node.beginRecording(1200, 200); Canvas.freeTextLayoutCaches(); state.resumeTiming(); Loading
apct-tests/perftests/core/src/android/widget/TextViewPrecomputedTextPerfTest.java +4 −4 Original line number Diff line number Diff line Loading @@ -344,7 +344,7 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.startRecording( final RecordingCanvas c = node.beginRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Loading @@ -371,7 +371,7 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.startRecording( final RecordingCanvas c = node.beginRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Loading Loading @@ -400,7 +400,7 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.startRecording( final RecordingCanvas c = node.beginRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Loading Loading @@ -430,7 +430,7 @@ public class TextViewPrecomputedTextPerfTest { textView.setText(text); textView.measure(width, height); textView.layout(0, 0, textView.getMeasuredWidth(), textView.getMeasuredHeight()); final RecordingCanvas c = node.startRecording( final RecordingCanvas c = node.beginRecording( textView.getMeasuredWidth(), textView.getMeasuredHeight()); textView.nullLayouts(); Canvas.freeTextLayoutCaches(); Loading
api/current.txt +14 −17 Original line number Diff line number Diff line Loading @@ -14946,13 +14946,15 @@ package android.graphics { public final class RenderNode { ctor public RenderNode(@Nullable String); method public int computeApproximateMemoryUsage(); method public android.graphics.RecordingCanvas beginRecording(int, int); method public android.graphics.RecordingCanvas beginRecording(); method public long computeApproximateMemoryUsage(); method public void discardDisplayList(); method public void endRecording(); method public float getAlpha(); method public int getAmbientShadowColor(); method @ColorInt public int getAmbientShadowColor(); method public int getBottom(); method public float getCameraDistance(); method @FloatRange(from=0.0f, to=java.lang.Float.MAX_VALUE) public float getCameraDistance(); method public boolean getClipToBounds(); method public boolean getClipToOutline(); method public float getElevation(); Loading @@ -14963,12 +14965,12 @@ package android.graphics { method public float getPivotX(); method public float getPivotY(); method public int getRight(); method public float getRotation(); method public float getRotationX(); method public float getRotationY(); method public float getRotationZ(); method public float getScaleX(); method public float getScaleY(); method public int getSpotShadowColor(); method @ColorInt public int getSpotShadowColor(); method public int getTop(); method public float getTranslationX(); method public float getTranslationY(); Loading @@ -14986,36 +14988,31 @@ package android.graphics { method public boolean offsetTopAndBottom(int); method public boolean resetPivot(); method public boolean setAlpha(float); method public boolean setAmbientShadowColor(int); method public boolean setBottom(int); method public boolean setCameraDistance(float); method public boolean setClipBounds(@Nullable android.graphics.Rect); method public boolean setAmbientShadowColor(@ColorInt int); method public boolean setCameraDistance(@FloatRange(from=0.0f, to=java.lang.Float.MAX_VALUE) float); method public boolean setClipRect(@Nullable android.graphics.Rect); method public boolean setClipToBounds(boolean); method public boolean setClipToOutline(boolean); method public boolean setElevation(float); method public boolean setForceDarkAllowed(boolean); method public boolean setHasOverlappingRendering(boolean); method public boolean setLeft(int); method public boolean setLeftTopRightBottom(int, int, int, int); method public boolean setOutline(@Nullable android.graphics.Outline); method public boolean setPivotX(float); method public boolean setPivotY(float); method public boolean setPosition(int, int, int, int); method public boolean setPosition(android.graphics.Rect); method public boolean setProjectBackwards(boolean); method public boolean setProjectionReceiver(boolean); method public boolean setRight(int); method public boolean setRotation(float); method public boolean setRotationX(float); method public boolean setRotationY(float); method public boolean setRotationZ(float); method public boolean setScaleX(float); method public boolean setScaleY(float); method public boolean setSpotShadowColor(int); method public boolean setTop(int); method public boolean setSpotShadowColor(@ColorInt int); method public boolean setTranslationX(float); method public boolean setTranslationY(float); method public boolean setTranslationZ(float); method public boolean setUseCompositingLayer(boolean, @Nullable android.graphics.Paint); method public android.graphics.RecordingCanvas startRecording(int, int); method public android.graphics.RecordingCanvas startRecording(); } public class Shader {
core/java/android/view/Surface.java +2 −2 Original line number Diff line number Diff line Loading @@ -922,7 +922,7 @@ public class Surface implements Parcelable { if (mCanvas != null) { throw new IllegalStateException("Surface was already locked!"); } mCanvas = mRenderNode.start(width, height); mCanvas = mRenderNode.beginRecording(width, height); return mCanvas; } Loading @@ -931,7 +931,7 @@ public class Surface implements Parcelable { throw new IllegalArgumentException("canvas object must be the same instance that " + "was previously returned by lockCanvas"); } mRenderNode.end(mCanvas); mRenderNode.endRecording(); mCanvas = null; nHwuiDraw(mHwuiRenderer); } Loading