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

Unified Diff: src/core/SkCoreBlitters.h

Issue 249643002: 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 | « src/core/SkComposeShader.cpp ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCoreBlitters.h
diff --git a/src/core/SkCoreBlitters.h b/src/core/SkCoreBlitters.h
index 2d22d38e782977fe48221a270ad85947836400c2..285184050ba88737b3b94391812a5af246e5da31 100644
--- a/src/core/SkCoreBlitters.h
+++ b/src/core/SkCoreBlitters.h
@@ -27,29 +27,12 @@
class SkShaderBlitter : public SkRasterBlitter {
public:
- /**
- * The storage for shaderContext is owned by the caller, but the object itself is not.
- * The blitter only ensures that the storage always holds a live object, but it may
- * exchange that object.
- */
- SkShaderBlitter(const SkBitmap& device, const SkPaint& paint,
- SkShader::Context* shaderContext);
+ SkShaderBlitter(const SkBitmap& device, const SkPaint& paint);
virtual ~SkShaderBlitter();
- /**
- * Create a new shader context and uses it instead of the old one if successful.
- * Will create the context at the same location as the old one (this is safe
- * because the shader itself is unchanged).
- */
- virtual bool resetShaderContext(const SkBitmap& device, const SkPaint& paint,
- const SkMatrix& matrix) SK_OVERRIDE;
-
- virtual SkShader::Context* getShaderContext() const SK_OVERRIDE { return fShaderContext; }
-
protected:
- uint32_t fShaderFlags;
- const SkShader* fShader;
- SkShader::Context* fShaderContext;
+ uint32_t fShaderFlags;
+ SkShader* fShader;
private:
// illegal
@@ -92,8 +75,7 @@
class SkA8_Shader_Blitter : public SkShaderBlitter {
public:
- SkA8_Shader_Blitter(const SkBitmap& device, const SkPaint& paint,
- SkShader::Context* shaderContext);
+ SkA8_Shader_Blitter(const SkBitmap& device, const SkPaint& paint);
virtual ~SkA8_Shader_Blitter();
virtual void blitH(int x, int y, int width);
virtual void blitAntiH(int x, int y, const SkAlpha antialias[], const int16_t runs[]);
@@ -159,8 +141,7 @@
class SkARGB32_Shader_Blitter : public SkShaderBlitter {
public:
- SkARGB32_Shader_Blitter(const SkBitmap& device, const SkPaint& paint,
- SkShader::Context* shaderContext);
+ SkARGB32_Shader_Blitter(const SkBitmap& device, const SkPaint& paint);
virtual ~SkARGB32_Shader_Blitter();
virtual void blitH(int x, int y, int width) SK_OVERRIDE;
virtual void blitV(int x, int y, int height, SkAlpha alpha) SK_OVERRIDE;
@@ -198,7 +179,6 @@
*/
SkBlitter* SkBlitter_ChooseD565(const SkBitmap& device, const SkPaint& paint,
- SkShader::Context* shaderContext,
SkTBlitterAllocator* allocator);
#endif
« no previous file with comments | « src/core/SkComposeShader.cpp ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698