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

Unified Diff: src/core/SkDraw.cpp

Issue 261773005: Remove SkShader virtual method validContext (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: correctly call shaderA/B in composeshader Created 6 years, 7 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/SkFilterShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDraw.cpp
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index c4f5f74eefb93ea0ca539e28b079d4e4125c4149..a74e3c0f798123845c718fb717a30bba6ca9e4f9 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -2353,7 +2353,6 @@ class SkTriColorShader : public SkShader {
public:
SkTriColorShader() {}
- virtual SkShader::Context* createContext(const ContextRec&, void*) const SK_OVERRIDE;
virtual size_t contextSize() const SK_OVERRIDE;
class TriColorShaderContext : public SkShader::Context {
@@ -2378,18 +2377,14 @@ public:
protected:
SkTriColorShader(SkReadBuffer& buffer) : SkShader(buffer) {}
+ virtual Context* onCreateContext(const ContextRec& rec, void* storage) const SK_OVERRIDE {
+ return SkNEW_PLACEMENT_ARGS(storage, TriColorShaderContext, (*this, rec));
+ }
+
private:
typedef SkShader INHERITED;
};
-SkShader::Context* SkTriColorShader::createContext(const ContextRec& rec, void* storage) const {
- if (!this->validContext(rec)) {
- return NULL;
- }
-
- return SkNEW_PLACEMENT_ARGS(storage, TriColorShaderContext, (*this, rec));
-}
-
bool SkTriColorShader::TriColorShaderContext::setup(const SkPoint pts[], const SkColor colors[],
int index0, int index1, int index2) {
« no previous file with comments | « src/core/SkComposeShader.cpp ('k') | src/core/SkFilterShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698