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

Side by Side Diff: src/effects/SkTransparentShader.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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | src/effects/gradients/SkLinearGradient.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #include "SkTransparentShader.h" 10 #include "SkTransparentShader.h"
11 #include "SkColorPriv.h" 11 #include "SkColorPriv.h"
12 #include "SkString.h" 12 #include "SkString.h"
13 13
14 SkShader::Context* SkTransparentShader::createContext(const ContextRec& rec, voi d* storage) const { 14 SkShader::Context* SkTransparentShader::onCreateContext(const ContextRec& rec,
15 if (!this->validContext(rec)) { 15 void* storage) const {
16 return NULL;
17 }
18
19 return SkNEW_PLACEMENT_ARGS(storage, TransparentShaderContext, (*this, rec)) ; 16 return SkNEW_PLACEMENT_ARGS(storage, TransparentShaderContext, (*this, rec)) ;
20 } 17 }
21 18
22 size_t SkTransparentShader::contextSize() const { 19 size_t SkTransparentShader::contextSize() const {
23 return sizeof(TransparentShaderContext); 20 return sizeof(TransparentShaderContext);
24 } 21 }
25 22
26 SkTransparentShader::TransparentShaderContext::TransparentShaderContext( 23 SkTransparentShader::TransparentShaderContext::TransparentShaderContext(
27 const SkTransparentShader& shader, const ContextRec& rec) 24 const SkTransparentShader& shader, const ContextRec& rec)
28 : INHERITED(shader, rec) 25 : INHERITED(shader, rec)
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 117
121 #ifndef SK_IGNORE_TO_STRING 118 #ifndef SK_IGNORE_TO_STRING
122 void SkTransparentShader::toString(SkString* str) const { 119 void SkTransparentShader::toString(SkString* str) const {
123 str->append("SkTransparentShader: ("); 120 str->append("SkTransparentShader: (");
124 121
125 this->INHERITED::toString(str); 122 this->INHERITED::toString(str);
126 123
127 str->append(")"); 124 str->append(")");
128 } 125 }
129 #endif 126 #endif
OLDNEW
« no previous file with comments | « src/effects/SkPerlinNoiseShader.cpp ('k') | src/effects/gradients/SkLinearGradient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698