diff options
author | 2014-04-23 16:16:55 +0000 | |
---|---|---|
committer | 2014-04-23 16:16:55 +0000 | |
commit | 6e5671d8c9b2d9885e351b631b1dfbb4ed403789 (patch) | |
tree | bb57851cce11e3881a9051265a7fbdd6c97cc37b /src/core/SkFilterShader.h | |
parent | 0ad7936b7bf9f4caefd5ff1bd40dc1b50adb76ab (diff) |
Revert of Extract most of the mutable state of SkShader into a separate Context object. (https://codereview.chromium.org/207683004/)
Reason for revert:
This is blocking the DEPS roll into Chromium. Failures can be seen here:
http://build.chromium.org/p/tryserver.chromium/builders/android_dbg/builds/174333
Original issue's description:
> Extract most of the mutable state of SkShader into a separate Context object.
>
> SkShader currently stores some state during draw calls via setContext(...).
> Move that mutable state into a separate SkShader::Context class that is
> constructed on demand for the duration of the draw.
>
> Calls to setContext() are replaced with createContext() which returns a context
> corresponding to the shader object or NULL if the parameters to createContext
> are invalid.
>
> TEST=out/Debug/dm
> BUG=skia:1976
>
> Committed: http://code.google.com/p/skia/source/detail?r=14216
>
> Committed: http://code.google.com/p/skia/source/detail?r=14323
R=scroggo@google.com, skyostil@chromium.org, tomhudson@chromium.org, senorblanco@chromium.org, reed@google.com, bungeman@google.com, dominikg@chromium.org
TBR=bungeman@google.com, dominikg@chromium.org, reed@google.com, scroggo@google.com, senorblanco@chromium.org, skyostil@chromium.org, tomhudson@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=skia:1976
Author: bsalomon@google.com
Review URL: https://codereview.chromium.org/249643002
git-svn-id: http://skia.googlecode.com/svn/trunk@14326 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkFilterShader.h')
-rw-r--r-- | src/core/SkFilterShader.h | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/core/SkFilterShader.h b/src/core/SkFilterShader.h index 4ef4577248..11add0cf17 100644 --- a/src/core/SkFilterShader.h +++ b/src/core/SkFilterShader.h @@ -17,29 +17,12 @@ public: SkFilterShader(SkShader* shader, SkColorFilter* filter); virtual ~SkFilterShader(); - virtual bool validContext(const SkBitmap&, const SkPaint&, - const SkMatrix&, SkMatrix* totalInverse = NULL) const SK_OVERRIDE; - virtual SkShader::Context* createContext(const SkBitmap&, const SkPaint&, - const SkMatrix&, void* storage) const SK_OVERRIDE; - virtual size_t contextSize() const SK_OVERRIDE; - - class FilterShaderContext : public SkShader::Context { - public: - // Takes ownership of shaderContext and calls its destructor. - FilterShaderContext(const SkFilterShader& filterShader, SkShader::Context* shaderContext, - const SkBitmap& device, const SkPaint& paint, const SkMatrix& matrix); - virtual ~FilterShaderContext(); - - virtual uint32_t getFlags() const SK_OVERRIDE; - - virtual void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE; - virtual void shadeSpan16(int x, int y, uint16_t[], int count) SK_OVERRIDE; - - private: - SkShader::Context* fShaderContext; - - typedef SkShader::Context INHERITED; - }; + virtual uint32_t getFlags() SK_OVERRIDE; + virtual bool setContext(const SkBitmap&, const SkPaint&, + const SkMatrix&) SK_OVERRIDE; + virtual void endContext() SK_OVERRIDE; + virtual void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE; + virtual void shadeSpan16(int x, int y, uint16_t[], int count) SK_OVERRIDE; SK_TO_STRING_OVERRIDE() SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkFilterShader) |