OLD | NEW |
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 fPicture ? fPicture->cullRect().fRight : 0, | 205 fPicture ? fPicture->cullRect().fRight : 0, |
206 fPicture ? fPicture->cullRect().fBottom : 0); | 206 fPicture ? fPicture->cullRect().fBottom : 0); |
207 | 207 |
208 str->appendf("(%s, %s)", gTileModeName[fTmx], gTileModeName[fTmy]); | 208 str->appendf("(%s, %s)", gTileModeName[fTmx], gTileModeName[fTmy]); |
209 | 209 |
210 this->INHERITED::toString(str); | 210 this->INHERITED::toString(str); |
211 } | 211 } |
212 #endif | 212 #endif |
213 | 213 |
214 #if SK_SUPPORT_GPU | 214 #if SK_SUPPORT_GPU |
215 bool SkPictureShader::asNewEffect(GrContext* context, const SkPaint& paint, | 215 bool SkPictureShader::asFragmentProcessor(GrContext* context, const SkPaint& pai
nt, |
216 const SkMatrix* localMatrix, GrColor* paintCol
or, | 216 const SkMatrix* localMatrix, GrColor*
paintColor, |
217 GrEffect** effect) const { | 217 GrFragmentProcessor** fp) const { |
218 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(context->getMatrix
(), localMatrix)); | 218 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(context->getMatrix
(), localMatrix)); |
219 if (!bitmapShader) { | 219 if (!bitmapShader) { |
220 return false; | 220 return false; |
221 } | 221 } |
222 return bitmapShader->asNewEffect(context, paint, NULL, paintColor, effect); | 222 return bitmapShader->asFragmentProcessor(context, paint, NULL, paintColor, f
p); |
223 } | 223 } |
224 #else | 224 #else |
225 bool SkPictureShader::asNewEffect(GrContext* context, const SkPaint& paint, | 225 bool SkPictureShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMa
trix*, GrColor*, |
226 const SkMatrix* localMatrix, GrColor* paintCol
or, | 226 GrFragmentProcessor**) const { |
227 GrEffect** effect) const { | |
228 SkDEBUGFAIL("Should not call in GPU-less build"); | 227 SkDEBUGFAIL("Should not call in GPU-less build"); |
229 return false; | 228 return false; |
230 } | 229 } |
231 #endif | 230 #endif |
OLD | NEW |