Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: include/core/SkComposeShader.h

Issue 241283003: Revert of Extract most of the mutable state of SkShader into a separate Context object. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkColorShader.h ('k') | include/core/SkEmptyShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkComposeShader.h
diff --git a/include/core/SkComposeShader.h b/include/core/SkComposeShader.h
index 9833a9f4ade275ac0fa6fa4358a5edbb5930b826..b54e5efa97e0914dab0564ed940e1f9958607b64 100644
--- a/include/core/SkComposeShader.h
+++ b/include/core/SkComposeShader.h
@@ -34,38 +34,10 @@
SkComposeShader(SkShader* sA, SkShader* sB, SkXfermode* mode = NULL);
virtual ~SkComposeShader();
- 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*) const SK_OVERRIDE;
- virtual size_t contextSize() const SK_OVERRIDE;
-
- class ComposeShaderContext : public SkShader::Context {
- public:
- // When this object gets destroyed, it will call contextA and contextB's destructor
- // but it will NOT free the memory.
- ComposeShaderContext(const SkComposeShader&, const SkBitmap&,
- const SkPaint&, const SkMatrix&,
- SkShader::Context* contextA, SkShader::Context* contextB);
-
- SkShader::Context* getShaderContextA() const { return fShaderContextA; }
- SkShader::Context* getShaderContextB() const { return fShaderContextB; }
-
- virtual ~ComposeShaderContext();
-
- virtual void shadeSpan(int x, int y, SkPMColor[], int count) SK_OVERRIDE;
-
- private:
- SkShader::Context* fShaderContextA;
- SkShader::Context* fShaderContextB;
-
- typedef SkShader::Context INHERITED;
- };
-
-#if SK_DEBUG
- SkShader* getShaderA() { return fShaderA; }
- SkShader* getShaderB() { return fShaderB; }
-#endif
+ 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;
SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkComposeShader)
@@ -75,6 +47,7 @@
virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE;
private:
+
SkShader* fShaderA;
SkShader* fShaderB;
SkXfermode* fMode;
« no previous file with comments | « include/core/SkColorShader.h ('k') | include/core/SkEmptyShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698