Go to file
Mike Reed b43a3e0160 Only use DeviceCM->fNext if the layer doesn't affect the clip
Before this, fNext always pointed at the next (prev) saveLayer in the stack.
Typically each layer is isolated, as it is defined to "consume" the current clip.
Android has an option to not affect/consume the clip, hence the support for looping
through this link-list in updateMC().

The current code always executes this loop, subtracting the current layer's clip from
the global clip, so typically the 2nd iteration will see an empty remaining clip and
draw nothing ... but we still pay for the subtract and the draw-overhead.

This change makes fNext point to the next layer ONLY if the current layer was marked
as non-consuming.

As a side-effect, this change also now detects the "last" restore by looking for
fMCRec == null, rather than fNext == nullptr. fMCRec was always null on the last
layer, so this change is safe, and could have landed independently.

BUG=skia:6214

Change-Id: I787574fa35c4869d3b884054aece925f457ad5bd
Reviewed-on: https://skia-review.googlesource.com/8348
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2017-02-12 18:16:45 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Make header files self-sufficient 2017-02-10 01:19:52 +00:00
bin Clean up more references to GYP. 2017-02-06 17:55:35 +00:00
debugger Get Debugger app compiling again 2017-01-06 16:18:27 +00:00
dm SkColorSpace: remove named API, add gamut API 2017-02-07 19:33:37 +00:00
example bench, samples, etc: s/SkAutoTUnref/sk_sp/ 2016-11-07 15:17:32 +00:00
experimental Use SkArenaAlloc in the SkAutoBlitterChoose code. 2017-02-07 20:01:20 +00:00
fuzz [4fGradient] Relax interval checks for SkGradientShaderBase also 2017-02-09 20:44:47 +00:00
gm Revert "IWYU" 2017-02-11 01:25:19 +00:00
gn Delete legacy named color space API 2017-02-10 22:53:06 +00:00
include Revert "IWYU" 2017-02-11 01:25:19 +00:00
infra Update SKP version 2017-02-12 07:40:16 +00:00
platform_tools Updates to viewer gradle scripts 2017-02-09 14:30:22 +00:00
resources Reland "Respect canvas size and frame offset in webp decoder" 2017-02-07 22:40:13 +00:00
samplecode Revert "IWYU" 2017-02-11 01:25:19 +00:00
site Update codesearch docs. 2017-02-10 21:47:45 +00:00
src Only use DeviceCM->fNext if the layer doesn't affect the clip 2017-02-12 18:16:45 +00:00
tests Revert "IWYU" 2017-02-11 01:25:19 +00:00
third_party Integrate the ImGui library with viewer 2017-02-10 19:17:03 +00:00
tools Revert "IWYU" 2017-02-11 01:25:19 +00:00
.clang-format Mark flatennable macros as block beginning/ending in .clang-format 2017-01-09 15:31:36 +00:00
.gitignore Clean up more references to GYP. 2017-02-06 17:55:35 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS Fix typo in GrGLCaps 2016-11-18 23:20:51 +00:00
BUILD.gn Integrate the ImGui library with viewer 2017-02-10 19:17:03 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Integrate the ImGui library with viewer 2017-02-10 19:17:03 +00:00
Doxyfile Make the housekeeper upload doxygen to a newer bucket 2016-10-04 13:23:57 -07:00
LICENSE BUG=skia:5602 2016-09-02 11:19:34 -07:00
OWNERS add root files from chrome 2013-08-13 19:11:15 +00:00
PRESUBMIT.py Clean up more references to GYP. 2017-02-06 17:55:35 +00:00
public.bzl Compile SkJpegCodec on bzl iOS build 2017-02-10 18:46:38 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
whitespace.txt Marker for driver upgrade. 2017-02-10 18:08:48 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.