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

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: update dox, keep contextSize() defaulting to 0 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/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..a449d0fd9d4e7835c686d25c76cd5b0960846696 100644
--- a/src/core/SkShader.cpp
+++ b/src/core/SkShader.cpp
@@ -63,6 +63,15 @@ bool SkShader::validContext(const SkBitmap& device,
return this->computeTotalInverse(matrix, totalInverse);
}
+SkShader::Context* SkShader::createContext(const SkBitmap&, const SkPaint&, const SkMatrix&,
+ void* storage) const {
+ return NULL;
+}
+
+size_t SkShader::contextSize() const {
+ return 0;
scroggo 2014/04/30 21:38:23 This may assert in skia/ext/pixel_ref_utils_unitte
Dominik Grewe 2014/05/01 09:18:43 Yes, this will fail if a subclass doesn't overwrit
+}
+
SkShader::Context::Context(const SkShader& shader, const SkBitmap& device,
const SkPaint& paint, const SkMatrix& matrix)
: fShader(shader)
« no previous file with comments | « include/core/SkShader.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698