skia2/include/utils
mtklein 5087b2c067 Revert of Picture Recording: fix the performance bottleneck in SkDeferredCanvas::isFullFrame (patchset #7 id:140001 of https://codereview.chromium.org/545813002/)
Reason for revert:
This is leaking memory:

http://108.170.220.120:10117/builders/Test-Ubuntu13.10-GCE-NoGPU-x86_64-Debug-ASAN/builds/2516/steps/RunDM/logs/stdio

Original issue's description:
> Picture Recording: fix the performance bottleneck in SkDeferredCanvas::isFullFrame
>
> blink skips all pending commands during picture recording if it is drawing an opaque full-frame
> geometry or image. This may improve performance for some edge cases. To recognize an opaque
> full-frame drawing should be cheap enough. Otherwise, the overhead will offset the improvement.
> Unfortunately, data from perf for content_shell on Nexus7 shows that SkDeferredCanvas::isFullFrame
> is far from cheap. Table below shows that how much isFullFrame() costs in the whole render process.
>
> benchmark                              percentage
> my local benchmark(draw 1000 sprites)   4.1%
> speedReading                            2.8%
> FishIETank(1000 fishes)                 1.5%
> GUIMark3 Bitmap                         2.0%
>
> By contrast, real recording (SkGPipeCanvas::drawBitmapRectToRect) and real rasterization
> (GrDrawTarget::drawRect) cost ~4% and ~6% in the whole render process respectively. Apparently,
> SkDeferredCanvas::isFullFrame() is nontrivial.
>
> getDeviceSize() is the main contributor to this hotspot. The change simply save the canvasSize and
> reuse it among drawings if it is not a fresh frame. This change cut off ~65% (or improved ~2 times)
> of isFullFrame().
>
> telemetry smoothness canvas_tough_test didn't show obvious improvement or regression.
>
> BUG=411166
>
> Committed: https://skia.googlesource.com/skia/+/8e45c3777d886ba3fe239bb549d06b0693692152

R=junov@chromium.org, tomhudson@google.com, reed@google.com, yunchao.he@intel.com
TBR=junov@chromium.org, reed@google.com, tomhudson@google.com, yunchao.he@intel.com
NOTREECHECKS=true
NOTRY=true
BUG=411166

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/571053002
2014-09-15 06:00:49 -07:00
..
ios Drop executable flag from headers so that they can be packaged 2014-03-11 19:55:51 +00:00
mac expose CGImage -> SkBitmap 2014-04-22 20:24:33 +00:00
win "NULL !=" = NULL 2014-09-05 13:34:00 -07:00
SkBoundaryPatch.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkCamera.h remove SkScalarMul macro 2014-01-23 02:02:45 +00:00
SkCanvasStateUtils.h Change SkCanvasState to use inheritance. 2014-07-15 12:34:26 -07:00
SkCubicInterval.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkCullPoints.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkDebugUtils.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-02-15 07:16:57 +00:00
SkDeferredCanvas.h Revert of Picture Recording: fix the performance bottleneck in SkDeferredCanvas::isFullFrame (patchset #7 id:140001 of https://codereview.chromium.org/545813002/) 2014-09-15 06:00:49 -07:00
SkDumpCanvas.h SkTextBlob plumbing 2014-08-26 07:56:44 -07:00
SkEventTracer.h rename tracing parameter to be more consistent with other methods 2014-02-03 19:47:13 +00:00
SkFrontBufferedStream.h Hide implementation details: SkFrontBufferedStream 2013-11-12 20:53:05 +00:00
SkInterpolator.h Promote SkInterpolator unit test to our tests driver. 2014-06-26 13:07:05 -07:00
SkJSONCPP.h In Android framework, make tools depend on jsoncpp 2014-06-18 10:31:40 -07:00
SkLayer.h Extended Inst counting to find "unknown" leaked object (SkTMaskGamma) 2012-08-16 14:58:06 +00:00
SkLua.h SkTextBlob plumbing 2014-08-26 07:56:44 -07:00
SkLuaCanvas.h SkTextBlob plumbing 2014-08-26 07:56:44 -07:00
SkMatrix44.h Revert "Revert "add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning"" 2013-10-31 17:28:30 +00:00
SkMeshUtils.h Start cleaning up 64bit Win warnings 2013-10-14 21:53:24 +00:00
SkNinePatch.h Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/) 2012-08-23 18:09:54 +00:00
SkNoSaveLayerCanvas.h Revert of Revert of allow canvas to force conservative clips (for speed) (patchset #1 id:1 of https://codereview.chromium.org/554033003/) 2014-09-09 18:46:22 -07:00
SkNullCanvas.h Add SK_API to null canvas create method 2012-06-11 15:41:25 +00:00
SkNWayCanvas.h SkTextBlob plumbing 2014-08-26 07:56:44 -07:00
SkParse.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkParsePaint.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkParsePath.h Sanitizing source files in Skia_Periodic_House_Keeping 2013-01-26 07:06:02 +00:00
SkPathUtils.h Animated the PathUtils Sample to show path contours# Enter a description of the change. 2013-07-09 16:30:38 +00:00
SkPictureUtils.h Split SkPicturePlayback out of SkPictureData 2014-07-07 13:46:35 -07:00
SkProxyCanvas.h SkTextBlob plumbing 2014-08-26 07:56:44 -07:00
SkRandom.h remove SkScalarMul macro 2014-01-23 02:02:45 +00:00
SkRTConf.h Migrate SkRTConfRegistry test to DEF_TEST(). 2014-08-12 09:03:16 -07:00
SkWGL.h Revert of Testing TBR'ing public API owners (patchset #1 of https://codereview.chromium.org/486203009/) 2014-08-26 10:43:14 -07:00