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

Side by Side Diff: src/core/SkPictureShader.cpp

Issue 374923002: Goodbye GrEffectRef. (Closed) Base URL: https://skia.googlesource.com/skia.git@noref3
Patch Set: Address comments Created 6 years, 5 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
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/core/SkShader.cpp » ('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 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkPictureShader.h" 8 #include "SkPictureShader.h"
9 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 fPicture ? fPicture->height() : 0); 182 fPicture ? fPicture->height() : 0);
183 183
184 str->appendf("(%s, %s)", gTileModeName[fTmx], gTileModeName[fTmy]); 184 str->appendf("(%s, %s)", gTileModeName[fTmx], gTileModeName[fTmy]);
185 185
186 this->INHERITED::toString(str); 186 this->INHERITED::toString(str);
187 } 187 }
188 #endif 188 #endif
189 189
190 #if SK_SUPPORT_GPU 190 #if SK_SUPPORT_GPU
191 bool SkPictureShader::asNewEffect(GrContext* context, const SkPaint& paint, 191 bool SkPictureShader::asNewEffect(GrContext* context, const SkPaint& paint,
192 const SkMatrix* localMatrix, GrColor* grColor, 192 const SkMatrix* localMatrix, GrColor* paintCol or,
193 GrEffectRef** grEffect) const { 193 GrEffect** effect) const {
194 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(context->getMatrix (), localMatrix)); 194 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(context->getMatrix (), localMatrix));
195 if (!bitmapShader) { 195 if (!bitmapShader) {
196 return false; 196 return false;
197 } 197 }
198 return bitmapShader->asNewEffect(context, paint, NULL, grColor, grEffect); 198 return bitmapShader->asNewEffect(context, paint, NULL, paintColor, effect);
199 } 199 }
200 #else 200 #else
201 bool SkPictureShader::asNewEffect(GrContext* context, const SkPaint& paint, 201 bool SkPictureShader::asNewEffect(GrContext* context, const SkPaint& paint,
202 const SkMatrix* localMatrix, GrColor* grColor, 202 const SkMatrix* localMatrix, GrColor* paintCol or,
203 GrEffect** grEffect) const { 203 GrEffect** effect) const {
204 SkDEBUGFAIL("Should not call in GPU-less build"); 204 SkDEBUGFAIL("Should not call in GPU-less build");
205 return false; 205 return false;
206 } 206 }
207 #endif 207 #endif
OLDNEW
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/core/SkShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698