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

Unified Diff: src/effects/gradients/SkTwoPointRadialGradient.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/effects/gradients/SkTwoPointRadialGradient.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/gradients/SkTwoPointRadialGradient.cpp
diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp
index f691db291c931e193c7de3095e7d76eb7a8b048e..d85be5d3bab053e407e4b0ee4d4df266c328166d 100644
--- a/src/effects/gradients/SkTwoPointRadialGradient.cpp
+++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp
@@ -224,21 +224,12 @@ size_t SkTwoPointRadialGradient::contextSize() const {
return sizeof(TwoPointRadialGradientContext);
}
-bool SkTwoPointRadialGradient::validContext(const ContextRec& rec, SkMatrix* totalInverse) const {
+SkShader::Context* SkTwoPointRadialGradient::onCreateContext(const ContextRec& rec,
+ void* storage) const {
// For now, we might have divided by zero, so detect that.
if (0 == fDiffRadius) {
- return false;
- }
-
- return this->INHERITED::validContext(rec, totalInverse);
-}
-
-SkShader::Context* SkTwoPointRadialGradient::createContext(const ContextRec& rec,
- void* storage) const {
- if (!this->validContext(rec, NULL)) {
return NULL;
}
-
return SkNEW_PLACEMENT_ARGS(storage, TwoPointRadialGradientContext, (*this, rec));
}
« no previous file with comments | « src/effects/gradients/SkTwoPointRadialGradient.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698