History log of /external/skia/src/core/SkLiteDL.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
fed9cfdc0216152d7fffe6d838ea7281466ffe74 17-Mar-2017 Mike Reed <reed@google.com> remove legacy virtual for vertices, only support object form

BUG=skia:6366

Change-Id: Ic422fa44a788d3488c050c6218dbfba188bb8f3e
Reviewed-on: https://skia-review.googlesource.com/9835
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkLiteDL.cpp
e88a1cb20e6b4c9f099070112225a88693a4630b 17-Mar-2017 Mike Reed <reed@google.com> Revert[2] "More SkVertices implementation work""

The fix was to release the array of vertices in the picturerecorder
destructor (where we also release textblobs etc.

This reverts commit 1eb3fef136bc75bd8e8ed717ec7c5d4ab26def62.

BUG=skia:

Change-Id: I3bf4acd6ad209205b0832a3cb7f94cd89dfcefc5
Reviewed-on: https://skia-review.googlesource.com/9826
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkLiteDL.cpp
1eb3fef136bc75bd8e8ed717ec7c5d4ab26def62 17-Mar-2017 Mike Reed <reed@google.com> Revert "More SkVertices implementation work"

This reverts commit 14583e11fd622c686993b741499060a6f3527055.

Reason for revert: leaking

Direct leak of 499104 byte(s) in 2112 object(s) allocated from:
#0 0x1e195f0 in operator new(unsigned long) (/b/swarm_slave/w/irazbR79/out/Debug/dm+0x1e195f0)
#1 0x3142b0a in SkVertices::Builder::init(SkCanvas::VertexMode, int, int, SkVertices::Sizes const&) (/b/swarm_slave/w/irazbR79/out/Debug/dm+0x3142b0a)


Original change's description:
> More SkVertices implementation work
>
> - change virtuals to take const SkVertices*, as we do for TextBobs and Images
> - override onDrawVerticesObject in recording canvases
> - deserialize raw-vertices into SkVertices object
>
> Possibly a follow-on would intercept the raw-form directly in canvas,
> and remove the virtual, and only support the object form.
>
> BUG=skia:6366
>
> Change-Id: I57a932667ccb3b3b004beb802ac3ae6898e3c6e0
> Reviewed-on: https://skia-review.googlesource.com/9633
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>

TBR=bsalomon@google.com,reed@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:6366

Change-Id: I40bb7a20698ef6aa0a9ef71a3d6ac4c1473e081c
Reviewed-on: https://skia-review.googlesource.com/9825
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkLiteDL.cpp
14583e11fd622c686993b741499060a6f3527055 16-Mar-2017 Mike Reed <reed@google.com> More SkVertices implementation work

- change virtuals to take const SkVertices*, as we do for TextBobs and Images
- override onDrawVerticesObject in recording canvases
- deserialize raw-vertices into SkVertices object

Possibly a follow-on would intercept the raw-form directly in canvas,
and remove the virtual, and only support the object form.

BUG=skia:6366

Change-Id: I57a932667ccb3b3b004beb802ac3ae6898e3c6e0
Reviewed-on: https://skia-review.googlesource.com/9633
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/core/SkLiteDL.cpp
108943d6253315f22580ddb1c60d6d8adbbc5a6a 02-Mar-2017 Mike Klein <mtklein@chromium.org> Remove SkLiteDL::makeThreadsafe().

It's not used, and removing it cuts a branch in DrawDrawable::draw().

Change-Id: I15d13dda1ec594c525f5d108e208b00286c2d09f
Reviewed-on: https://skia-review.googlesource.com/9174
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/src/core/SkLiteDL.cpp
d7875f57bd5f17ac27f1cb2ace25224299ff2389 01-Mar-2017 Derek Sollenberger <djsollen@google.com> Refactor SkLiteDL to no longer extend SkDrawable.

Change-Id: Ieaa849bceba0e98e4c99491c721fe945a0694e68
Reviewed-on: https://skia-review.googlesource.com/9111
Reviewed-by: Mike Klein <mtklein@chromium.org>
Reviewed-by: Herb Derby <herb@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
/external/skia/src/core/SkLiteDL.cpp
267be7fbc38174652c750ec69d8dc1feaa72db0c 13-Feb-2017 Mike Reed <reed@google.com> Revert "Revert "IWYU""

This reverts commit 3c727d2386059c1d7cbdcdc9bef5fa18ed33667e.

BUG=skia:

Change-Id: I72e9b40fec96d044e0ac12906669a52529e77882
Reviewed-on: https://skia-review.googlesource.com/8356
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkLiteDL.cpp
3c727d2386059c1d7cbdcdc9bef5fa18ed33667e 11-Feb-2017 Robert Phillips <robertphillips@google.com> Revert "IWYU"

This reverts commit 2aeae78a2ce3b036f0401fd0381d6fd6e2a7a1fc.

Reason for revert: It looks like this is breaking the android roll

out/target/product/angler/obj/SHARED_LIBRARIES/libandroid_runtime_intermediates/android_graphics_Canvas.o frameworks/base/core/jni/android_graphics_Canvas.cpp"
frameworks/base/core/jni/android_graphics_Canvas.cpp:178:15: error: incomplete type 'SkRegion' named in nested name specifier



Original change's description:
> IWYU
>
> BUG=skia:
>
> Change-Id: Ib6b4d52841dbe3fa69a86ddb6b97d6a5d0f004ee
> Reviewed-on: https://skia-review.googlesource.com/8231
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>
>

TBR=fmalita@chromium.org,reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Change-Id: If979c3dd9dc3fe08ac450ced113b3d1e9a86f02a
Reviewed-on: https://skia-review.googlesource.com/8346
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
/external/skia/src/core/SkLiteDL.cpp
2aeae78a2ce3b036f0401fd0381d6fd6e2a7a1fc 10-Feb-2017 Mike Reed <reed@google.com> IWYU

BUG=skia:

Change-Id: Ib6b4d52841dbe3fa69a86ddb6b97d6a5d0f004ee
Reviewed-on: https://skia-review.googlesource.com/8231
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkLiteDL.cpp
c1f7774e8d327e3c98b4094c9c01d26e27013f71 09-Dec-2016 Mike Reed <reed@google.com> Revert[2] "remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS"

This reverts commit a129dfef2aaab0b5995cdf1ab7b2cdd41c29cf72.

BUG=skia:

Change-Id: I717de6e5fcd4516aa684b014b1414b0f82ac2b91
Reviewed-on: https://skia-review.googlesource.com/5722
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Derek Sollenberger <djsollen@google.com>
/external/skia/src/core/SkLiteDL.cpp
a129dfef2aaab0b5995cdf1ab7b2cdd41c29cf72 09-Dec-2016 Mike Reed <reed@google.com> Revert "remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS"

This reverts commit 8e7432b7f98dd592e529a0c8bb038d73ebfb0478.

Reason for revert: <INSERT REASONING HERE>

external/skia/bench/../tools/android/SkAndroidSDKCanvas.h:103:36: error: C++ requires a type specifier for all declarations
void onClipRect(const SkRect&, ClipOp, ClipEdgeStyle) override;

Original change's description:
> remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS
>
>
> switch over to SkClipOps now that SK_SUPPORT_LEGACY_CLIP_REGIONOPS is gone
>
> BUG=skia:
>
> Change-Id: Ifdc8b3746d508348a40cc009a4e529a1cb3c405d
> Reviewed-on: https://skia-review.googlesource.com/5714
> Commit-Queue: Mike Reed <reed@google.com>
> Reviewed-by: Mike Reed <reed@google.com>
>

TBR=reed@google.com,reviews@skia.org
BUG=skia:
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: If26ea91d7464615e43c1d3d2f726e337ff56b55c
Reviewed-on: https://skia-review.googlesource.com/5721
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/src/core/SkLiteDL.cpp
8e7432b7f98dd592e529a0c8bb038d73ebfb0478 08-Dec-2016 Mike Reed <reed@google.com> remove SK_SUPPORT_LEGACY_CLIP_REGIONOPS


switch over to SkClipOps now that SK_SUPPORT_LEGACY_CLIP_REGIONOPS is gone

BUG=skia:

Change-Id: Ifdc8b3746d508348a40cc009a4e529a1cb3c405d
Reviewed-on: https://skia-review.googlesource.com/5714
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
/external/skia/src/core/SkLiteDL.cpp
faba3715b8ddfaa0ce4df79bc8006e9bc7694e5b 03-Nov-2016 Mike Reed <reed@google.com> remove unused code around SK_SUPPORT_LEGACY_XFERMODE_PARAM

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4384

Change-Id: I5121acd027d935ade169ff65941f29f654a47bd0
Reviewed-on: https://skia-review.googlesource.com/4384
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkLiteDL.cpp
7d954ad797176afedb9262fdea4507d0fc60eb9d 28-Oct-2016 Mike Reed <reed@google.com> remove xfermode from public api

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4020

CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

Change-Id: I19cd056f2af778f10e8c6c2b7b2735593b43dbac
Reviewed-on: https://skia-review.googlesource.com/4020
Reviewed-by: Florin Malita <fmalita@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
/external/skia/src/core/SkLiteDL.cpp
b25c3522446c9f84369dec2327ed9995fdb326de 03-Oct-2016 Mike Klein <mtklein@chromium.org> SkLiteDL: much simpler to eliminate bitmaps in recorder.

This shouldn't be any significant change in behavior or performance,
but it leaves the code in SkLiteDL a bit simpler.

BUG=skia:

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2863

Change-Id: Ifb0023d56f7e9dae172d8021fb956b8fc9281b15
Reviewed-on: https://skia-review.googlesource.com/2863
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
/external/skia/src/core/SkLiteDL.cpp
71df2d7bc1bbc83ad4cf005f9027df4cb3b88a9b 30-Sep-2016 msarett <msarett@google.com> Add a src rect to drawImageLattice() API

This will allow us to draw ninepatches directly from an asset
texture without having to upload them individually.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2382893002

Review-Url: https://codereview.chromium.org/2382893002
/external/skia/src/core/SkLiteDL.cpp
71477bdfb08bed2a6daeac9fc03930dedb68bc2b 21-Sep-2016 liyuqian <liyuqian@google.com> Add setBounds to SkLiteDL for Android

The RootRenderNode in Android is changing bounds dynamically. This is a
temporary fix to accomodate that behaviour. (See also b/31304115)

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2358793002

Review-Url: https://codereview.chromium.org/2358793002
/external/skia/src/core/SkLiteDL.cpp
73603f3c52ffd89fe9d035be827b566a0e7d3b79 20-Sep-2016 reed <reed@google.com> abstract name of clipping ops, to transtion to a more restricted set

SkRegion::Op --> SkCanvas::ClipOp (alias) --> SkClipOp

pre-CL needed in chrome : https://codereview.chromium.org/2355583002/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355483002

Review-Url: https://codereview.chromium.org/2355483002
/external/skia/src/core/SkLiteDL.cpp
f53fcc8ccaaa5e3cd24846d9e3ac38ad311f3711 08-Sep-2016 mtklein <mtklein@chromium.org> SkLiteDL: drawAsLayer()

This more or less the API you were thinking?

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2315283002

Review-Url: https://codereview.chromium.org/2315283002
/external/skia/src/core/SkLiteDL.cpp
0764efe6a9ae65ad83992f614f57ca9db5b1f191 02-Sep-2016 msarett <msarett@google.com> Add option to skip rects to drawImageLattice()

HWUI skips transparent rects when drawing.

When skia draws using bilerp, we will blend
transparent rects with neighboring rects and might
draw a bit of a smudge.

This CL adds the option to skip rects, allowing us
to have compatible behavior with the framework.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2305433002

Review-Url: https://codereview.chromium.org/2305433002
/external/skia/src/core/SkLiteDL.cpp
df0e3ece70762fd4674e09e457e5accb4265995d 02-Sep-2016 mtklein <mtklein@google.com> Revert of Force SkPath::getConvexity() cache for thread safety. (patchset #1 id:1 of https://codereview.chromium.org/2300003003/ )

Reason for revert:
I don't see anything else in the roll that could have caused the diff.

Original issue's description:
> Force SkPath::getConvexity() cache for thread safety.
>
> I happened to stumble on this in a run of TSAN:
> https://luci-milo.appspot.com/swarming/task/30fffe9497dc6310/steps/dm/0/stdout
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300003003
>
> Committed: https://skia.googlesource.com/skia/+/d0634eeb565d706df2e148a33f137c6edf42bf2e

TBR=reed@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2303303002
/external/skia/src/core/SkLiteDL.cpp
6ae6969434302da86de1169545939461ac7147b9 02-Sep-2016 reed <reed@google.com> record drawfilters

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2303033002

Review-Url: https://codereview.chromium.org/2303033002
/external/skia/src/core/SkLiteDL.cpp
d0634eeb565d706df2e148a33f137c6edf42bf2e 01-Sep-2016 mtklein <mtklein@chromium.org> Force SkPath::getConvexity() cache for thread safety.

I happened to stumble on this in a run of TSAN:
https://luci-milo.appspot.com/swarming/task/30fffe9497dc6310/steps/dm/0/stdout

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300003003

Review-Url: https://codereview.chromium.org/2300003003
/external/skia/src/core/SkLiteDL.cpp
e4d6a1be481fab631022b90788fa079317aba75b 29-Aug-2016 mtklein <mtklein@chromium.org> remove dead code

TBR=

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2286253003

Review-Url: https://codereview.chromium.org/2286253003
/external/skia/src/core/SkLiteDL.cpp
44df651ebefc284acc2f66425dff3ea0b0e14b36 25-Aug-2016 msarett <msarett@google.com> Add drawRegion() API to SkCanvas

This will allow us to optimize for the RectGrid macrobench.
Currently, SkiaGL is much slower than OpenGL.
SkiaGL 12 items/s
OpenGL 160 items/s

This contains everything except for the fast implementation on GPU.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2277053002

Review-Url: https://codereview.chromium.org/2277053002
/external/skia/src/core/SkLiteDL.cpp
e6f5d5623160a69e1585f5121a3695092327dfe0 25-Aug-2016 vjiaoblack <vjiaoblack@google.com> Made shadows blurry (thru implementing variance mapping)

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2224163005

Review-Url: https://codereview.chromium.org/2224163005
/external/skia/src/core/SkLiteDL.cpp
ac3aa245acc7b469aa2f0d0078e53401d78ac8b9 19-Aug-2016 bsalomon <bsalomon@google.com> Plumb drawArc to SkDevice.

Plumbs the drawArc canvas method down to SkDevice without converting to a path. Plumbs through the various recording canvas classes.

BUG=skia:5227
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2257023003

Review-Url: https://codereview.chromium.org/2257023003
/external/skia/src/core/SkLiteDL.cpp
cbdf007bc2eb85056a1a5c75c088202becba2d16 19-Aug-2016 mtklein <mtklein@chromium.org> Fast path translate() in SkCanvas and SkLiteDL.

This adds didTranslate() so that SkLiteDL (and other canvas recorders)
can record the translate rather than the full concat.

It also adds a case to SkMatrix::preTranslate() to fast path
translate x translate -> translate (i.e. +=).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255283002

Committed: https://skia.googlesource.com/skia/+/5fa47f4fd13b3158de4599414c86d17649c2dd1c

Misc bots failing in pictureimagefilter replay modes.
https://luci-milo.appspot.com/swarming/task/30b8e53f3a1f4f10/steps/dm/0/stdout

Problem is FMA vs. not.

CQ_INCLUDE_TRYBOTS=master.client.skia:
Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-Fast-Trybot

Review-Url: https://codereview.chromium.org/2255283002
/external/skia/src/core/SkLiteDL.cpp
954df2fe9f4f66655c99af08b108cb582c402c5d 19-Aug-2016 mtklein <mtklein@google.com> Revert of Fast path translate() in SkCanvas and SkLiteDL. (patchset #5 id:80001 of https://codereview.chromium.org/2255283002/ )

Reason for revert:
speculative

Original issue's description:
> Fast path translate() in SkCanvas and SkLiteDL.
>
> This adds didTranslate() so that SkLiteDL (and other canvas recorders)
> can record the translate rather than the full concat.
>
> It also adds a case to SkMatrix::preTranslate() to fast path
> translate x translate -> translate (i.e. +=).
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255283002
>
> Committed: https://skia.googlesource.com/skia/+/5fa47f4fd13b3158de4599414c86d17649c2dd1c

TBR=herb@google.com,reed@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2264433002
/external/skia/src/core/SkLiteDL.cpp
5fa47f4fd13b3158de4599414c86d17649c2dd1c 19-Aug-2016 mtklein <mtklein@chromium.org> Fast path translate() in SkCanvas and SkLiteDL.

This adds didTranslate() so that SkLiteDL (and other canvas recorders)
can record the translate rather than the full concat.

It also adds a case to SkMatrix::preTranslate() to fast path
translate x translate -> translate (i.e. +=).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2255283002

Review-Url: https://codereview.chromium.org/2255283002
/external/skia/src/core/SkLiteDL.cpp
91cd2803e78c876bc8eac07480465d9bf8457786 17-Aug-2016 mtklein <mtklein@chromium.org> SkLiteDL: a little spring cleaning

- kill off optimizeFor() now that we know it's broken and have a better way;
- simplify makeThreadsafe() a bit: we're not calling it anyway.

This sort of earns me back some crazy code currency,
which I am going to try to spend making reset() faster.

If anything, this appears to make makeThreadsafe() _faster_.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2254913002

Review-Url: https://codereview.chromium.org/2254913002
/external/skia/src/core/SkLiteDL.cpp
1da01c123ddcae083319d70d742db3142725f92c 17-Aug-2016 mtklein <mtklein@chromium.org> SkLiteDL: inline empty()

1.85% 1.85% RenderThread 6458 6475 /system/lib64/libskia.so SkLiteDL::empty() const

:/

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2254823002

Review-Url: https://codereview.chromium.org/2254823002
/external/skia/src/core/SkLiteDL.cpp
6480619f9ff4676a97edae41b2ca23eadeddcfbf 17-Aug-2016 mtklein <mtklein@chromium.org> SkLiteDL: thread the original canvas matrix through for SetMatrix::Draw().

The SkLiteDL is recorded in some identity space (imagine, SkMatrix::I()),
but played back in a different one (here named SkMatrix original). Any
calls to setMatrix() need to be made relative to this new space.

All other ops already operate in relative coordinates.

This should let us not fiddle with setMatrix().

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2247353003

Review-Url: https://codereview.chromium.org/2247353003
/external/skia/src/core/SkLiteDL.cpp
883c8efae702462fa28e7ce4f17199bbfa1ce360 16-Aug-2016 mtklein <mtklein@chromium.org> SkLiteDL: remove freelisting, add reset() and SKLITEDL_PAGE knob.

We think Android can cache these better than a global freelist allows.
This removes the freelisting but adds reset() to allow reuse.

I took the opportunity to abstract 4096 as a define SKLITEDL_PAGE.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2248693004

Review-Url: https://codereview.chromium.org/2248693004
/external/skia/src/core/SkLiteDL.cpp
168820625c35a8c19f66c661efcbce7a5e334837 16-Aug-2016 msarett <msarett@google.com> Add onDrawBitmapLattice(), avoid unnecessary bitmap->image copy

out/Release/nanobench --match Lattice --config gpu --ms 3000
3.42ms -> 17.2us

For reference, a loop over drawBitmapRects (which is what
Android currently does) is about 13us.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2205273003

Review-Url: https://codereview.chromium.org/2205273003
/external/skia/src/core/SkLiteDL.cpp
2ae98b0afc584d68ed22ed29df3f24cfa8aad0a2 15-Aug-2016 mtklein <mtklein@chromium.org> just add SkLiteDL::empty()

TBR=djsollen@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2249713002

Review-Url: https://codereview.chromium.org/2249713002
/external/skia/src/core/SkLiteDL.cpp
d559eb2f471b53e208a0ef79d34c6e26a70c3f50 11-Aug-2016 mtklein <mtklein@chromium.org> SkLiteDL: turn vtable sideways

Instead of using virtuals for polymorphism, store each polymorphic operation
in its own array of function pointers. This removes an indirection when calling
the function, and lets us use nullptr as a signal to skip the call entirely.

Unfortunately (as the old code is rather simpler) this makes an unambiguous speed improvement.

Before:
curr/maxrss loops min median mean max stddev samples config bench
21/26 MB 2 44.6µs 46.4µs 48.3µs 274µs 13% 51724 nonrendering desk_nytimes.skp
23/26 MB 11 11.4µs 11.9µs 12.4µs 75.1µs 15% 36716 nonrendering keymobi_nytimes_com_.skp

After:
19/26 MB 4 40.4µs 41.6µs 42.5µs 197µs 10% 29379 nonrendering desk_nytimes.skp
20/26 MB 14 10.5µs 10.7µs 11.2µs 59.5µs 13% 31971 nonrendering keymobi_nytimes_com_.skp

Broader comparison:
keymobi_linkedin.skp 1.76us -> 1.77us 1x
keymobi_bing_com_search_q_sloth.skp 5.09us -> 5.05us 0.99x
keymobi_digg_com.skp 17.4us -> 17.3us 0.99x
keymobi_theverge_com.skp 3.37us -> 3.34us 0.99x
top25desk_mail_google_com_mail_.skp 30.8us -> 30.4us 0.99x
tabl_gmail.skp 3.44us -> 3.38us 0.98x
top25desk_wikipedia__1_tab_.skp 100us -> 97.7us 0.98x
keymobi_cnn_com_2012_10_03_poli.skp 52.9us -> 51.7us 0.98x
desk_chalkboard.skp 107us -> 104us 0.97x
desk_css3gradients.skp 17.8us -> 17.3us 0.97x
keymobi_androidpolice_com_2012_.skp 42.3us -> 41.1us 0.97x
desk_googlehome.skp 1.94us -> 1.88us 0.97x
keymobi_mlb_com_.skp 5.38us -> 5.18us 0.96x
top25desk_pinterest.skp 92.1us -> 88.5us 0.96x
keymobi_iphone_capitolvolkswage.skp 15.1us -> 14.5us 0.96x
keymobi_techcrunch_com.skp 9.45us -> 9.05us 0.96x
desk_espn.skp 31.3us -> 30us 0.96x
keymobi_slashdot_org_.skp 8.72us -> 8.34us 0.96x
desk_tiger8svg.skp 30.6us -> 29.2us 0.96x
keymobi_blogger.skp 4.09us -> 3.91us 0.95x
keymobi_baidu_com_s_wd_barack_o.skp 11.9us -> 11.3us 0.95x
keymobi_cuteoverload_com.skp 54.2us -> 51.6us 0.95x
keymobi_deviantart_com_.skp 17.2us -> 16.4us 0.95x
desk_mapsvg.skp 163ns -> 155ns 0.95x
keymobi_pinterest.skp 6.97us -> 6.62us 0.95x
top25desk_games_yahoo_com.skp 94.1us -> 89.3us 0.95x
top25desk_google_com_calendar_.skp 18us -> 17us 0.95x
keymobi_google_co_uk_search_hl_.skp 11.4us -> 10.8us 0.95x
tabl_pravda.skp 38.5us -> 36.4us 0.94x
desk_gmailthread.skp 19us -> 17.9us 0.94x
keymobi_reddit_com_r_programmin.skp 76.1us -> 71.7us 0.94x
top25desk_linkedin.skp 20us -> 18.8us 0.94x
tabl_gamedeksiam.skp 118us -> 112us 0.94x
keymobi_boingboing_net.skp 20.4us -> 19.1us 0.93x
top25desk_google_com__hl_en_q_b.skp 17.6us -> 16.4us 0.93x
keymobi_amazon_com_gp_aw_s_ref_.skp 12.5us -> 11.6us 0.93x
keymobi_sfgate_com_.skp 16.6us -> 15.5us 0.93x
keymobi_booking_com_searchresul.skp 16.2us -> 15.1us 0.93x
tabl_digg.skp 28.8us -> 26.8us 0.93x
tabl_mozilla.skp 80.4us -> 74.6us 0.93x
desk_wowwiki.skp 39.2us -> 36.4us 0.93x
top25desk_youtube_com.skp 42us -> 38.9us 0.93x
top25desk_facebook.skp 23.7us -> 22us 0.93x
top25desk_blogger.skp 38.2us -> 35.4us 0.93x
keymobi_online_wsj_com_home_pag.skp 12.8us -> 11.9us 0.93x
top25desk_wordpress.skp 28.9us -> 26.8us 0.93x
top25desk_answers_yahoo_com.skp 37.2us -> 34.4us 0.93x
keymobi_plus_google_com_app_bas.skp 9.56us -> 8.85us 0.93x
keymobi_wordpress.skp 16.1us -> 14.9us 0.92x
keymobi_mobile_news_sandbox_goo.skp 27.1us -> 24.9us 0.92x
top25desk_techcrunch_com.skp 31.1us -> 28.6us 0.92x
keymobi_worldjournal_com_.skp 50.7us -> 46.5us 0.92x
keymobi_theverge_com_2012_10_28.skp 26.2us -> 24us 0.92x
desk_jsfiddlebigcar.skp 1.73us -> 1.59us 0.92x
top25desk_weather_com.skp 31.3us -> 28.7us 0.92x
top25desk_google_com_search_q_c.skp 48.2us -> 44.1us 0.92x
top25desk_twitter.skp 27.8us -> 25.5us 0.92x
tabl_worldjournal.skp 29.3us -> 26.8us 0.91x
desk_nytimes.skp 46us -> 42us 0.91x
top25desk_docs___1_open_documen.skp 6.04us -> 5.51us 0.91x
keymobi_wikipedia__1_tab_.skp 59.7us -> 54.4us 0.91x
desk_unicodetable.skp 1.12ms -> 1.02ms 0.91x
top25desk_ebay_com.skp 17.8us -> 16.2us 0.91x
keymobi_ftw_usatoday_com_2014_0.skp 26.8us -> 24.3us 0.91x
top25desk_sports_yahoo_com_.skp 49.9us -> 45.3us 0.91x
keymobi_cnn_com.skp 9.94us -> 9.03us 0.91x
keymobi_m_youtube_com_watch_v_9.skp 13.4us -> 12.2us 0.91x
top25desk_amazon_com.skp 26.6us -> 24.1us 0.91x
keymobi_news_yahoo_com.skp 17.5us -> 15.8us 0.9x
keymobi_wowwiki_com_world_of_wa.skp 11.2us -> 10.2us 0.9x
top25desk_plus_google_com_11003.skp 93.5us -> 84.4us 0.9x
desk_carsvg.skp 53.5us -> 48.2us 0.9x
top25desk_news_yahoo_com.skp 44.7us -> 40.3us 0.9x
keymobi_wikipedia__1_tab____del.skp 59.4us -> 53.4us 0.9x
desk_googlespreadsheet.skp 66us -> 59.2us 0.9x
keymobi_answers_yahoo_com_quest.skp 30.2us -> 27us 0.89x
desk_ugamsolutions.skp 13us -> 11.6us 0.89x
keymobi_shop_mobileweb_ebay_com.skp 6.96us -> 6.21us 0.89x
keymobi_nytimes_com_.skp 12.1us -> 10.8us 0.89x
keymobi_gsp_ro.skp 5.54us -> 4.92us 0.89x
top25desk_booking_com.skp 54.9us -> 48.6us 0.89x
top25desk_espn.skp 37us -> 32.6us 0.88x
keymobi_facebook_com_barackobam.skp 23.3us -> 20.4us 0.88x

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231103002

Committed: https://skia.googlesource.com/skia/+/ac243914af957a806d842318a43dddaf5f941dc3

CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_chromium_compile_dbg_ng

Review-Url: https://codereview.chromium.org/2231103002
/external/skia/src/core/SkLiteDL.cpp
d230149ef889e920556949d2e50a1519b93aefea 11-Aug-2016 reed <reed@google.com> Revert of SkLiteDL: turn vtable sideways (patchset #7 id:120001 of https://codereview.chromium.org/2231103002/ )

Reason for revert:
speculative revert to fix DEPS roll

Original issue's description:
> SkLiteDL: turn vtable sideways
>
> Instead of using virtuals for polymorphism, store each polymorphic operation
> in its own array of function pointers. This removes an indirection when calling
> the function, and lets us use nullptr as a signal to skip the call entirely.
>
> Unfortunately (as the old code is rather simpler) this makes an unambiguous speed improvement.
>
> Before:
> curr/maxrss loops min median mean max stddev samples config bench
> 21/26 MB 2 44.6µs 46.4µs 48.3µs 274µs 13% 51724 nonrendering desk_nytimes.skp
> 23/26 MB 11 11.4µs 11.9µs 12.4µs 75.1µs 15% 36716 nonrendering keymobi_nytimes_com_.skp
>
> After:
> 19/26 MB 4 40.4µs 41.6µs 42.5µs 197µs 10% 29379 nonrendering desk_nytimes.skp
> 20/26 MB 14 10.5µs 10.7µs 11.2µs 59.5µs 13% 31971 nonrendering keymobi_nytimes_com_.skp
>
> Broader comparison:
> keymobi_linkedin.skp 1.76us -> 1.77us 1x
> keymobi_bing_com_search_q_sloth.skp 5.09us -> 5.05us 0.99x
> keymobi_digg_com.skp 17.4us -> 17.3us 0.99x
> keymobi_theverge_com.skp 3.37us -> 3.34us 0.99x
> top25desk_mail_google_com_mail_.skp 30.8us -> 30.4us 0.99x
> tabl_gmail.skp 3.44us -> 3.38us 0.98x
> top25desk_wikipedia__1_tab_.skp 100us -> 97.7us 0.98x
> keymobi_cnn_com_2012_10_03_poli.skp 52.9us -> 51.7us 0.98x
> desk_chalkboard.skp 107us -> 104us 0.97x
> desk_css3gradients.skp 17.8us -> 17.3us 0.97x
> keymobi_androidpolice_com_2012_.skp 42.3us -> 41.1us 0.97x
> desk_googlehome.skp 1.94us -> 1.88us 0.97x
> keymobi_mlb_com_.skp 5.38us -> 5.18us 0.96x
> top25desk_pinterest.skp 92.1us -> 88.5us 0.96x
> keymobi_iphone_capitolvolkswage.skp 15.1us -> 14.5us 0.96x
> keymobi_techcrunch_com.skp 9.45us -> 9.05us 0.96x
> desk_espn.skp 31.3us -> 30us 0.96x
> keymobi_slashdot_org_.skp 8.72us -> 8.34us 0.96x
> desk_tiger8svg.skp 30.6us -> 29.2us 0.96x
> keymobi_blogger.skp 4.09us -> 3.91us 0.95x
> keymobi_baidu_com_s_wd_barack_o.skp 11.9us -> 11.3us 0.95x
> keymobi_cuteoverload_com.skp 54.2us -> 51.6us 0.95x
> keymobi_deviantart_com_.skp 17.2us -> 16.4us 0.95x
> desk_mapsvg.skp 163ns -> 155ns 0.95x
> keymobi_pinterest.skp 6.97us -> 6.62us 0.95x
> top25desk_games_yahoo_com.skp 94.1us -> 89.3us 0.95x
> top25desk_google_com_calendar_.skp 18us -> 17us 0.95x
> keymobi_google_co_uk_search_hl_.skp 11.4us -> 10.8us 0.95x
> tabl_pravda.skp 38.5us -> 36.4us 0.94x
> desk_gmailthread.skp 19us -> 17.9us 0.94x
> keymobi_reddit_com_r_programmin.skp 76.1us -> 71.7us 0.94x
> top25desk_linkedin.skp 20us -> 18.8us 0.94x
> tabl_gamedeksiam.skp 118us -> 112us 0.94x
> keymobi_boingboing_net.skp 20.4us -> 19.1us 0.93x
> top25desk_google_com__hl_en_q_b.skp 17.6us -> 16.4us 0.93x
> keymobi_amazon_com_gp_aw_s_ref_.skp 12.5us -> 11.6us 0.93x
> keymobi_sfgate_com_.skp 16.6us -> 15.5us 0.93x
> keymobi_booking_com_searchresul.skp 16.2us -> 15.1us 0.93x
> tabl_digg.skp 28.8us -> 26.8us 0.93x
> tabl_mozilla.skp 80.4us -> 74.6us 0.93x
> desk_wowwiki.skp 39.2us -> 36.4us 0.93x
> top25desk_youtube_com.skp 42us -> 38.9us 0.93x
> top25desk_facebook.skp 23.7us -> 22us 0.93x
> top25desk_blogger.skp 38.2us -> 35.4us 0.93x
> keymobi_online_wsj_com_home_pag.skp 12.8us -> 11.9us 0.93x
> top25desk_wordpress.skp 28.9us -> 26.8us 0.93x
> top25desk_answers_yahoo_com.skp 37.2us -> 34.4us 0.93x
> keymobi_plus_google_com_app_bas.skp 9.56us -> 8.85us 0.93x
> keymobi_wordpress.skp 16.1us -> 14.9us 0.92x
> keymobi_mobile_news_sandbox_goo.skp 27.1us -> 24.9us 0.92x
> top25desk_techcrunch_com.skp 31.1us -> 28.6us 0.92x
> keymobi_worldjournal_com_.skp 50.7us -> 46.5us 0.92x
> keymobi_theverge_com_2012_10_28.skp 26.2us -> 24us 0.92x
> desk_jsfiddlebigcar.skp 1.73us -> 1.59us 0.92x
> top25desk_weather_com.skp 31.3us -> 28.7us 0.92x
> top25desk_google_com_search_q_c.skp 48.2us -> 44.1us 0.92x
> top25desk_twitter.skp 27.8us -> 25.5us 0.92x
> tabl_worldjournal.skp 29.3us -> 26.8us 0.91x
> desk_nytimes.skp 46us -> 42us 0.91x
> top25desk_docs___1_open_documen.skp 6.04us -> 5.51us 0.91x
> keymobi_wikipedia__1_tab_.skp 59.7us -> 54.4us 0.91x
> desk_unicodetable.skp 1.12ms -> 1.02ms 0.91x
> top25desk_ebay_com.skp 17.8us -> 16.2us 0.91x
> keymobi_ftw_usatoday_com_2014_0.skp 26.8us -> 24.3us 0.91x
> top25desk_sports_yahoo_com_.skp 49.9us -> 45.3us 0.91x
> keymobi_cnn_com.skp 9.94us -> 9.03us 0.91x
> keymobi_m_youtube_com_watch_v_9.skp 13.4us -> 12.2us 0.91x
> top25desk_amazon_com.skp 26.6us -> 24.1us 0.91x
> keymobi_news_yahoo_com.skp 17.5us -> 15.8us 0.9x
> keymobi_wowwiki_com_world_of_wa.skp 11.2us -> 10.2us 0.9x
> top25desk_plus_google_com_11003.skp 93.5us -> 84.4us 0.9x
> desk_carsvg.skp 53.5us -> 48.2us 0.9x
> top25desk_news_yahoo_com.skp 44.7us -> 40.3us 0.9x
> keymobi_wikipedia__1_tab____del.skp 59.4us -> 53.4us 0.9x
> desk_googlespreadsheet.skp 66us -> 59.2us 0.9x
> keymobi_answers_yahoo_com_quest.skp 30.2us -> 27us 0.89x
> desk_ugamsolutions.skp 13us -> 11.6us 0.89x
> keymobi_shop_mobileweb_ebay_com.skp 6.96us -> 6.21us 0.89x
> keymobi_nytimes_com_.skp 12.1us -> 10.8us 0.89x
> keymobi_gsp_ro.skp 5.54us -> 4.92us 0.89x
> top25desk_booking_com.skp 54.9us -> 48.6us 0.89x
> top25desk_espn.skp 37us -> 32.6us 0.88x
> keymobi_facebook_com_barackobam.skp 23.3us -> 20.4us 0.88x
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231103002
>
> Committed: https://skia.googlesource.com/skia/+/ac243914af957a806d842318a43dddaf5f941dc3

TBR=mtklein@google.com,mtklein@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2232183002
/external/skia/src/core/SkLiteDL.cpp
ac243914af957a806d842318a43dddaf5f941dc3 11-Aug-2016 mtklein <mtklein@chromium.org> SkLiteDL: turn vtable sideways

Instead of using virtuals for polymorphism, store each polymorphic operation
in its own array of function pointers. This removes an indirection when calling
the function, and lets us use nullptr as a signal to skip the call entirely.

Unfortunately (as the old code is rather simpler) this makes an unambiguous speed improvement.

Before:
curr/maxrss loops min median mean max stddev samples config bench
21/26 MB 2 44.6µs 46.4µs 48.3µs 274µs 13% 51724 nonrendering desk_nytimes.skp
23/26 MB 11 11.4µs 11.9µs 12.4µs 75.1µs 15% 36716 nonrendering keymobi_nytimes_com_.skp

After:
19/26 MB 4 40.4µs 41.6µs 42.5µs 197µs 10% 29379 nonrendering desk_nytimes.skp
20/26 MB 14 10.5µs 10.7µs 11.2µs 59.5µs 13% 31971 nonrendering keymobi_nytimes_com_.skp

Broader comparison:
keymobi_linkedin.skp 1.76us -> 1.77us 1x
keymobi_bing_com_search_q_sloth.skp 5.09us -> 5.05us 0.99x
keymobi_digg_com.skp 17.4us -> 17.3us 0.99x
keymobi_theverge_com.skp 3.37us -> 3.34us 0.99x
top25desk_mail_google_com_mail_.skp 30.8us -> 30.4us 0.99x
tabl_gmail.skp 3.44us -> 3.38us 0.98x
top25desk_wikipedia__1_tab_.skp 100us -> 97.7us 0.98x
keymobi_cnn_com_2012_10_03_poli.skp 52.9us -> 51.7us 0.98x
desk_chalkboard.skp 107us -> 104us 0.97x
desk_css3gradients.skp 17.8us -> 17.3us 0.97x
keymobi_androidpolice_com_2012_.skp 42.3us -> 41.1us 0.97x
desk_googlehome.skp 1.94us -> 1.88us 0.97x
keymobi_mlb_com_.skp 5.38us -> 5.18us 0.96x
top25desk_pinterest.skp 92.1us -> 88.5us 0.96x
keymobi_iphone_capitolvolkswage.skp 15.1us -> 14.5us 0.96x
keymobi_techcrunch_com.skp 9.45us -> 9.05us 0.96x
desk_espn.skp 31.3us -> 30us 0.96x
keymobi_slashdot_org_.skp 8.72us -> 8.34us 0.96x
desk_tiger8svg.skp 30.6us -> 29.2us 0.96x
keymobi_blogger.skp 4.09us -> 3.91us 0.95x
keymobi_baidu_com_s_wd_barack_o.skp 11.9us -> 11.3us 0.95x
keymobi_cuteoverload_com.skp 54.2us -> 51.6us 0.95x
keymobi_deviantart_com_.skp 17.2us -> 16.4us 0.95x
desk_mapsvg.skp 163ns -> 155ns 0.95x
keymobi_pinterest.skp 6.97us -> 6.62us 0.95x
top25desk_games_yahoo_com.skp 94.1us -> 89.3us 0.95x
top25desk_google_com_calendar_.skp 18us -> 17us 0.95x
keymobi_google_co_uk_search_hl_.skp 11.4us -> 10.8us 0.95x
tabl_pravda.skp 38.5us -> 36.4us 0.94x
desk_gmailthread.skp 19us -> 17.9us 0.94x
keymobi_reddit_com_r_programmin.skp 76.1us -> 71.7us 0.94x
top25desk_linkedin.skp 20us -> 18.8us 0.94x
tabl_gamedeksiam.skp 118us -> 112us 0.94x
keymobi_boingboing_net.skp 20.4us -> 19.1us 0.93x
top25desk_google_com__hl_en_q_b.skp 17.6us -> 16.4us 0.93x
keymobi_amazon_com_gp_aw_s_ref_.skp 12.5us -> 11.6us 0.93x
keymobi_sfgate_com_.skp 16.6us -> 15.5us 0.93x
keymobi_booking_com_searchresul.skp 16.2us -> 15.1us 0.93x
tabl_digg.skp 28.8us -> 26.8us 0.93x
tabl_mozilla.skp 80.4us -> 74.6us 0.93x
desk_wowwiki.skp 39.2us -> 36.4us 0.93x
top25desk_youtube_com.skp 42us -> 38.9us 0.93x
top25desk_facebook.skp 23.7us -> 22us 0.93x
top25desk_blogger.skp 38.2us -> 35.4us 0.93x
keymobi_online_wsj_com_home_pag.skp 12.8us -> 11.9us 0.93x
top25desk_wordpress.skp 28.9us -> 26.8us 0.93x
top25desk_answers_yahoo_com.skp 37.2us -> 34.4us 0.93x
keymobi_plus_google_com_app_bas.skp 9.56us -> 8.85us 0.93x
keymobi_wordpress.skp 16.1us -> 14.9us 0.92x
keymobi_mobile_news_sandbox_goo.skp 27.1us -> 24.9us 0.92x
top25desk_techcrunch_com.skp 31.1us -> 28.6us 0.92x
keymobi_worldjournal_com_.skp 50.7us -> 46.5us 0.92x
keymobi_theverge_com_2012_10_28.skp 26.2us -> 24us 0.92x
desk_jsfiddlebigcar.skp 1.73us -> 1.59us 0.92x
top25desk_weather_com.skp 31.3us -> 28.7us 0.92x
top25desk_google_com_search_q_c.skp 48.2us -> 44.1us 0.92x
top25desk_twitter.skp 27.8us -> 25.5us 0.92x
tabl_worldjournal.skp 29.3us -> 26.8us 0.91x
desk_nytimes.skp 46us -> 42us 0.91x
top25desk_docs___1_open_documen.skp 6.04us -> 5.51us 0.91x
keymobi_wikipedia__1_tab_.skp 59.7us -> 54.4us 0.91x
desk_unicodetable.skp 1.12ms -> 1.02ms 0.91x
top25desk_ebay_com.skp 17.8us -> 16.2us 0.91x
keymobi_ftw_usatoday_com_2014_0.skp 26.8us -> 24.3us 0.91x
top25desk_sports_yahoo_com_.skp 49.9us -> 45.3us 0.91x
keymobi_cnn_com.skp 9.94us -> 9.03us 0.91x
keymobi_m_youtube_com_watch_v_9.skp 13.4us -> 12.2us 0.91x
top25desk_amazon_com.skp 26.6us -> 24.1us 0.91x
keymobi_news_yahoo_com.skp 17.5us -> 15.8us 0.9x
keymobi_wowwiki_com_world_of_wa.skp 11.2us -> 10.2us 0.9x
top25desk_plus_google_com_11003.skp 93.5us -> 84.4us 0.9x
desk_carsvg.skp 53.5us -> 48.2us 0.9x
top25desk_news_yahoo_com.skp 44.7us -> 40.3us 0.9x
keymobi_wikipedia__1_tab____del.skp 59.4us -> 53.4us 0.9x
desk_googlespreadsheet.skp 66us -> 59.2us 0.9x
keymobi_answers_yahoo_com_quest.skp 30.2us -> 27us 0.89x
desk_ugamsolutions.skp 13us -> 11.6us 0.89x
keymobi_shop_mobileweb_ebay_com.skp 6.96us -> 6.21us 0.89x
keymobi_nytimes_com_.skp 12.1us -> 10.8us 0.89x
keymobi_gsp_ro.skp 5.54us -> 4.92us 0.89x
top25desk_booking_com.skp 54.9us -> 48.6us 0.89x
top25desk_espn.skp 37us -> 32.6us 0.88x
keymobi_facebook_com_barackobam.skp 23.3us -> 20.4us 0.88x

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231103002

Review-Url: https://codereview.chromium.org/2231103002
/external/skia/src/core/SkLiteDL.cpp
3ff2cc81a58b3fe5287980cf618147c84a6c81f6 10-Aug-2016 mtklein <mtklein@chromium.org> constexpr NaN,+Inf,-Inf

Reading extern values meant these couldn't be compile-time constants.

math.h has INFINITY, which is macro that is supposed to expand to float +inf.
On MSVC it seems it's natively a double, so we cast just to make sure.

There's nan(const char*) in math.h for NaN too, but I don't trust that
to be compile-time evaluated. So instead, we keep reinterpreting a bit pattern.

I did try to write

static constexpr float float_nan() { ... }

and completely failed. constexpr seems a bit too restrictive in C++11 to make
it work, but Clang kept telling me, you'll be able to do this with C++14.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2233853002

Review-Url: https://codereview.chromium.org/2233853002
/external/skia/src/core/SkLiteDL.cpp
cd8864111d191be4db42a478d6bf877eb50277a7 10-Aug-2016 mtklein <mtklein@chromium.org> constexpr infinity

~/skia (inf) $ nm /tmp/rel/obj/src/core/libskia.SkLiteDL.o | grep GLOBAL__sub
<nothing>

TBR=halcanary@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2228203002

Review-Url: https://codereview.chromium.org/2228203002
/external/skia/src/core/SkLiteDL.cpp
b20283357a09300353dd62962086f3791161e3b8 10-Aug-2016 mtklein <mtklein@chromium.org> allocate memory manually in SkLiteDL

Instead of growing at SkTDArray's chosen rate (+4, then *1.25),
grow in additive 4K pages. This is my attempt to make realloc()
have the best chance of not copying and to keep fragmentation down.
Because we use a freelist the rate we grow doesn't affect performance
too much.

I'm not getting very reliable numbers, but this looks maybe 5-10% faster
for recording, mainly I think from inlining the allocation fast path into
push().

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231553002

Review-Url: https://codereview.chromium.org/2231553002
/external/skia/src/core/SkLiteDL.cpp
baeec6d25e02596f32d3307b5b4f88649dd2994f 10-Aug-2016 mtklein <mtklein@chromium.org> SkLiteDL: add some missing std::move()

This cuts a ref+unref roundtrip on all draw{Bitmap,Image}

I set this up originally and just... forgot.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2234483002

Review-Url: https://codereview.chromium.org/2234483002
/external/skia/src/core/SkLiteDL.cpp
c0fc9d63569fe9bf6cd10fb028d0a0606278c2da 09-Aug-2016 mtklein <mtklein@chromium.org> SkLiteDL: tiny perf tweak

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2229003003

Review-Url: https://codereview.chromium.org/2229003003
/external/skia/src/core/SkLiteDL.cpp
0c753e5c268ef88dee3cb5356f58b43a1e58fbf2 09-Aug-2016 mtklein <mtklein@chromium.org> Purge the SkLiteDL freelist when PurgeAllCaches() is called.

Seems like the polite thing to do.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2228953002

Review-Url: https://codereview.chromium.org/2228953002
/external/skia/src/core/SkLiteDL.cpp
765b6e654802b770784becf3f53e5bd8beea4c9d 08-Aug-2016 mtklein <mtklein@chromium.org> SkLiteDL: control reuse by a single parameter

This simply caps the number of times a display list can be reused.
As this number goes up, the average amount of memory we cache goes up
and the expected number of mallocs per SkLiteDL::New() goes down.

This strategy does not need a hard-coded cap on how many display lists
to cache, or how big they can grow.

TBR=herb@google.com

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2226813002

Review-Url: https://codereview.chromium.org/2226813002
/external/skia/src/core/SkLiteDL.cpp
03591a762c0e3f541141d570625c2dab16deacba 07-Aug-2016 mtklein <mtklein@chromium.org> finish SkLiteDL

- makeThreadsafe()
- fix up some alignment problems
- drawVertices / drawPatch
- work around drawPicture() + default paint bugs?
- turn on tests.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2219343002

Review-Url: https://codereview.chromium.org/2219343002
/external/skia/src/core/SkLiteDL.cpp
29de8d938da91a8bc02e73568979a209f116f79e 07-Aug-2016 mtklein <mtklein@chromium.org> SkLiteDL, very nearly the rest

fix saveLayer bounds
all the misc calls
a bit of refactoring

just drawVertices and drawPatch to go, plus some todos and likely bug fixes

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2226563002

Review-Url: https://codereview.chromium.org/2226563002
/external/skia/src/core/SkLiteDL.cpp
ec559591ae8f2c7005ad3824b718df5f01747851 07-Aug-2016 mtklein <mtklein@chromium.org> SkLiteDL: closing in

- optimizeFor(GrContext*)
- images
- basic text

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2224753002

Review-Url: https://codereview.chromium.org/2224753002
/external/skia/src/core/SkLiteDL.cpp
6f8411dfa4506564d9886c08cceb154713feb3f8 07-Aug-2016 mtklein <mtklein@chromium.org> flesh out more of SkLiteDL:

save layer, clips, simple draws

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2226513002

Review-Url: https://codereview.chromium.org/2226513002
/external/skia/src/core/SkLiteDL.cpp
9c5052f16b249d2b7674ea86bd24ed0038ccc61f 06-Aug-2016 mtklein <mtklein@chromium.org> SkLite*

SkLiteRecorder, a new SkCanvas, fills out SkLiteDL, a new SkDrawable.

This SkDrawable is a display list similar to SkRecord and SkBigPicture / SkRecordedDrawable, but with a few new design points inspired by Android and slimming paint:

1) SkLiteDL is structured as one big contiguous array rather than the two layer structure of SkRecord. This trades away flexibility and large-op-count performance for better data locality for small to medium size pictures.

2) We keep a global freelist of SkLiteDLs, both reusing the SkLiteDL struct itself and its contiguous byte array. This keeps the expected number of mallocs per display list allocation <1 (really, ~0) for cyclical use cases.

These two together mean recording is faster. Measuring against the code we use at head, SkLiteRecorder trends about ~3x faster across various size pictures, matching speed at 0 draws and beating the special-case 1-draw pictures we have today. (I.e. we won't need those special case implementations anymore, because they're slower than this new generic code.) This new strategy records 10 drawRects() in about the same time the old strategy took for 2.

This strategy stays the winner until at least 500 drawRect()s on my laptop, where I stopped checking.

A simpler alternative to freelisting is also possible (but not implemented here), where we allow the client to manually reset() an SkLiteDL for reuse when its refcnt is 1. That's essentially what we're doing with the freelist, except tracking what's available for reuse globally instead of making the client do it.

This code is not fully capable yet, but most of the key design points are there. The internal structure of SkLiteDL is the area I expect to be most volatile (anything involving Op), but its interface and the whole of SkLiteRecorder ought to be just about done.

You can run nanobench --match picture_overhead as a demo. Everything it exercises is fully fleshed out, so what it tests is an apples-to-apples comparison as far as recording costs go. I have not yet compared playback performance.

It should be simple to wrap this into an SkPicture subclass if we want.

I won't start proposing we replace anything old with anything new quite yet until I have more ducks in a row, but this does look pretty promising (similar to the SkRecord over old SkPicture change a couple years ago) and I'd like to land, experiment, iterate, especially with an eye toward Android.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2213333002

Review-Url: https://codereview.chromium.org/2213333002
/external/skia/src/core/SkLiteDL.cpp