diff options
author | liyuqian <liyuqian@google.com> | 2016-09-12 13:00:50 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-12 13:00:50 -0700 |
commit | 91c4271310f11c29d008e8bd92446170308cf3b4 (patch) | |
tree | 22916589b2147a2b019cb4ec07e4f0f687e97a58 /src/core/SkLiteRecorder.cpp | |
parent | 790c90b20e4e28f19e3e2a73d5f9315980fd45c1 (diff) |
Revert of SkLiteRecorder: don't tell SkCanvas about clips (patchset #1 id:1 of https://codereview.chromium.org/2227833004/ )
Reason for revert:
This CL breaks Android CTS tests CanvasStateTests#testClipPathReturnValues, CanvasStateTests#testClipRectReturnValues, and CanvasStateTests#testQuickReject.
Reverting it won't significantly affect Android's performance. See the following test result of testInvalidateTree Jank test. (Derek said that this is the only test closely related to this CL.)
**After reverting**
INSTRUMENTATION_STATUS: gfx-max-slow-draw=0.0
INSTRUMENTATION_STATUS: gfx-max-high-input-latency=0.0
INSTRUMENTATION_STATUS: gfx-max-slow-ui-thread=100.0
INSTRUMENTATION_STATUS: gfx-avg-slow-bitmap-uploads=100.0
INSTRUMENTATION_STATUS: gfx-avg-missed-vsync=72.96467105972435
INSTRUMENTATION_STATUS: gfx-avg-high-input-latency=0.0
INSTRUMENTATION_STATUS: gfx-max-slow-bitmap-uploads=100.0
INSTRUMENTATION_STATUS: gfx-max-missed-vsync=73.56181150550796
INSTRUMENTATION_STATUS: gfx-avg-frame-time-90=69.0
INSTRUMENTATION_STATUS: gfx-avg-frame-time-95=69.0
INSTRUMENTATION_STATUS: gfx-avg-frame-time-99=69.0
INSTRUMENTATION_STATUS: gfx-max-jank=100.0
INSTRUMENTATION_STATUS: gfx-avg-slow-draw=0.0
INSTRUMENTATION_STATUS: gfx-avg-slow-ui-thread=100.0
INSTRUMENTATION_STATUS: gfx-max-frame-time-90=69
INSTRUMENTATION_STATUS: gfx-max-frame-time-95=69
INSTRUMENTATION_STATUS: gfx-max-frame-time-99=69
INSTRUMENTATION_STATUS: gfx-avg-jank=100.0
INSTRUMENTATION_STATUS_CODE: -1
.
Test results for InstrumentationTestRunner=.
Time: 77.404
**Before Reverting**
gfx-max-slow-draw=1.1135857461024499
INSTRUMENTATION_STATUS: gfx-max-high-input-latency=0.0
INSTRUMENTATION_STATUS: gfx-max-slow-ui-thread=100.0
INSTRUMENTATION_STATUS: gfx-avg-slow-bitmap-uploads=100.0
INSTRUMENTATION_STATUS: gfx-avg-missed-vsync=70.79687591131983
INSTRUMENTATION_STATUS: gfx-avg-high-input-latency=0.0
INSTRUMENTATION_STATUS: gfx-max-slow-bitmap-uploads=100.0
INSTRUMENTATION_STATUS: gfx-max-missed-vsync=76.94174757281553
INSTRUMENTATION_STATUS: gfx-avg-frame-time-90=67.66666666666667
INSTRUMENTATION_STATUS: gfx-avg-frame-time-95=67.66666666666667
INSTRUMENTATION_STATUS: gfx-avg-frame-time-99=69.0
INSTRUMENTATION_STATUS: gfx-max-jank=100.0
INSTRUMENTATION_STATUS: gfx-avg-slow-draw=0.5317509395832639
INSTRUMENTATION_STATUS: gfx-avg-slow-ui-thread=100.0
INSTRUMENTATION_STATUS: gfx-max-frame-time-90=69
INSTRUMENTATION_STATUS: gfx-max-frame-time-95=69
INSTRUMENTATION_STATUS: gfx-max-frame-time-99=69
INSTRUMENTATION_STATUS: gfx-avg-jank=100.0
INSTRUMENTATION_STATUS_CODE: -1
.
Test results for InstrumentationTestRunner=.
Time: 77.411
OK (1 test)
Original issue's description:
> SkLiteRecorder: don't tell SkCanvas about clips
>
> If no one reads our clip, and we don't expect quickReject() to help,
> we can probably get away without maintaining a proper clip stack.
>
> This puts us at about 0.6-0.7x of previous record cost.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2227833004
>
> Committed: https://skia.googlesource.com/skia/+/8369e32a05543c2619b1d7e740fe6ff6d2f03af3
TBR=reed@google.com,mtklein@google.com,mtklein@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=skia:
Review-Url: https://codereview.chromium.org/2335773002
Diffstat (limited to 'src/core/SkLiteRecorder.cpp')
-rw-r--r-- | src/core/SkLiteRecorder.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/core/SkLiteRecorder.cpp b/src/core/SkLiteRecorder.cpp index 93251f9e62..bc5ffbe052 100644 --- a/src/core/SkLiteRecorder.cpp +++ b/src/core/SkLiteRecorder.cpp @@ -42,15 +42,19 @@ void SkLiteRecorder::didTranslate(SkScalar dx, SkScalar dy) { fDL->translate(dx, void SkLiteRecorder::onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle style) { fDL->clipRect(rect, op, style==kSoft_ClipEdgeStyle); + SkCanvas::onClipRect(rect, op, style); } void SkLiteRecorder::onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyle style) { fDL->clipRRect(rrect, op, style==kSoft_ClipEdgeStyle); + SkCanvas::onClipRRect(rrect, op, style); } void SkLiteRecorder::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyle style) { fDL->clipPath(path, op, style==kSoft_ClipEdgeStyle); + SkCanvas::onClipPath(path, op, style); } void SkLiteRecorder::onClipRegion(const SkRegion& region, SkRegion::Op op) { fDL->clipRegion(region, op); + SkCanvas::onClipRegion(region, op); } void SkLiteRecorder::onDrawPaint(const SkPaint& paint) { |