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) { |