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

Unified Diff: include/core/SkEmptyShader.h

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 | « include/core/SkComposeShader.h ('k') | include/core/SkShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkEmptyShader.h
diff --git a/include/core/SkEmptyShader.h b/include/core/SkEmptyShader.h
index d1a067f432576ceb6987627537f5f478855e1eae..7de3bc1f8f9c2105681d6dde157448e5b4257335 100644
--- a/include/core/SkEmptyShader.h
+++ b/include/core/SkEmptyShader.h
@@ -1,4 +1,3 @@
-
/*
* Copyright 2011 Google Inc.
*
@@ -6,13 +5,13 @@
* found in the LICENSE file.
*/
-
-
#ifndef SkEmptyShader_DEFINED
#define SkEmptyShader_DEFINED
#include "SkShader.h"
+// TODO: move this to private, as there is a public factory on SkShader
+
/**
* \class SkEmptyShader
* A Shader that always draws nothing. Its createContext always returns NULL.
@@ -27,21 +26,16 @@ public:
return sizeof(SkShader::Context);
}
- virtual bool validContext(const ContextRec&, SkMatrix* totalInverse = NULL) const SK_OVERRIDE {
- return false;
- }
-
- virtual SkShader::Context* createContext(const ContextRec&, void*) const SK_OVERRIDE {
- // validContext returns false.
- return NULL;
- }
-
SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkEmptyShader)
protected:
SkEmptyShader(SkReadBuffer& buffer) : INHERITED(buffer) {}
+ virtual SkShader::Context* onCreateContext(const ContextRec&, void*) const SK_OVERRIDE {
+ return NULL;
+ }
+
private:
typedef SkShader INHERITED;
};
« no previous file with comments | « include/core/SkComposeShader.h ('k') | include/core/SkShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698