Provide a GPU implementation of SkArithmeticMode, using a custom GrEffect exposed...
authorsenorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 29 May 2013 20:55:09 +0000 (20:55 +0000)
committersenorblanco@chromium.org <senorblanco@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 29 May 2013 20:55:09 +0000 (20:55 +0000)
commit9a6eb0e1e8a8de7371cd9604f34619b8f87de66f
tree8564502495bbe823b0afa1d7370520e080f600f7
parent1198e740d58abba5edc749c14ed088688b3e76ca
Provide a GPU implementation of SkArithmeticMode, using a custom GrEffect exposed via asNewEffectOrCoeff().

Doing it this way required modifying the arithmode GM to use saveLayer()/restore() rather than creating an offscreen SkBitmap, since otherwise the compositing is always done in raster mode. Fixing that in turn exposed that SkArithmeticMode did not work in Picture mode, since it wasn't flattenable. Made it so.

Note: this will require rebaselining the arithmode GM (again).

R=bsalomon@google.com, reed@google.com

Originally committed: https://code.google.com/p/skia/source/detail?r=9324
Reverted: https://code.google.com/p/skia/source/detail?r=9325

Review URL: https://codereview.chromium.org/16064002

git-svn-id: http://skia.googlecode.com/svn/trunk@9330 2bbb7eff-a529-9590-31e7-b0007b416f81
gm/arithmode.cpp
include/effects/SkArithmeticMode.h
src/effects/SkArithmeticMode.cpp
src/ports/SkGlobalInitialization_default.cpp