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

Unified Diff: src/core/SkShader.cpp

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
« include/core/SkShader.h ('K') | « include/core/SkShader.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkShader.cpp
diff --git a/src/core/SkShader.cpp b/src/core/SkShader.cpp
index 4ddd29150b182f13505597e4449f3a046eeb9427..0c542bf20041ab46ae9a4a9e8457129301a090c1 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -63,6 +63,17 @@ bool SkShader::validContext(const SkBitmap& device,
return this->computeTotalInverse(matrix, totalInverse);
}
+SkShader::Context* SkShader::createContext(const SkBitmap&, const SkPaint&, const SkMatrix&,
+ void* storage) const {
+ // should be overridden by subclass
+ return NULL;
+}
+
+size_t SkShader::contextSize() const {
+ // should be overridden by subclass
+ return 0;
+}
+
SkShader::Context::Context(const SkShader& shader, const SkBitmap& device,
const SkPaint& paint, const SkMatrix& matrix)
: fShader(shader)
« include/core/SkShader.h ('K') | « include/core/SkShader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698