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

Unified Diff: include/core/SkShader.h

Issue 262703002: add default impl for context methods on shader (Closed) Base URL: https://skia.googlecode.com/svn/trunk
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 | « no previous file | src/core/SkShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkShader.h
diff --git a/include/core/SkShader.h b/include/core/SkShader.h
index 4af8f78bfbaa9ca8523b3262870081fbd10ace65..296a55b1f80c0d9052e4186f6ef1a8dae10f9bf5 100644
--- a/include/core/SkShader.h
+++ b/include/core/SkShader.h
@@ -207,16 +207,20 @@ public:
* Create the actual object that does the shading.
* Returns NULL if validContext() returns false.
* Size of storage must be >= contextSize.
+ *
+ * Base class implementation returns NULL.
*/
virtual Context* createContext(const SkBitmap& device,
const SkPaint& paint,
const SkMatrix& matrix,
- void* storage) const = 0;
+ void* storage) const;
/**
* Return the size of a Context returned by createContext.
+ *
+ * Base class implementation returns 0.
scroggo 2014/04/30 18:52:02 Due to a requirement in SkSmallAllocator (which co
*/
- virtual size_t contextSize() const = 0;
+ virtual size_t contextSize() const;
scroggo 2014/04/30 18:52:02 I like pure virtual function, because if someone w
/**
* Helper to check the flags to know if it is legal to call shadeSpan16()
« no previous file with comments | « no previous file | src/core/SkShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698