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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 fPicture ? fPicture->cullRect().fBottom : 0); | 283 fPicture ? fPicture->cullRect().fBottom : 0); |
284 | 284 |
285 str->appendf("(%s, %s)", gTileModeName[fTmx], gTileModeName[fTmy]); | 285 str->appendf("(%s, %s)", gTileModeName[fTmx], gTileModeName[fTmy]); |
286 | 286 |
287 this->INHERITED::toString(str); | 287 this->INHERITED::toString(str); |
288 } | 288 } |
289 #endif | 289 #endif |
290 | 290 |
291 #if SK_SUPPORT_GPU | 291 #if SK_SUPPORT_GPU |
292 bool SkPictureShader::asFragmentProcessor(GrContext* context, const SkPaint& pai
nt, | 292 bool SkPictureShader::asFragmentProcessor(GrContext* context, const SkPaint& pai
nt, |
293 const SkMatrix* localMatrix, GrColor*
paintColor, | 293 const SkMatrix& viewM, const SkMatrix*
localMatrix, |
| 294 GrColor* paintColor, |
294 GrFragmentProcessor** fp) const { | 295 GrFragmentProcessor** fp) const { |
295 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(context->getMatrix
(), localMatrix)); | 296 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix
)); |
296 if (!bitmapShader) { | 297 if (!bitmapShader) { |
297 return false; | 298 return false; |
298 } | 299 } |
299 return bitmapShader->asFragmentProcessor(context, paint, NULL, paintColor, f
p); | 300 return bitmapShader->asFragmentProcessor(context, paint, viewM, NULL, paintC
olor, fp); |
300 } | 301 } |
301 #else | 302 #else |
302 bool SkPictureShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMa
trix*, GrColor*, | 303 bool SkPictureShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMa
trix&, |
| 304 const SkMatrix*, GrColor*, |
303 GrFragmentProcessor**) const { | 305 GrFragmentProcessor**) const { |
304 SkDEBUGFAIL("Should not call in GPU-less build"); | 306 SkDEBUGFAIL("Should not call in GPU-less build"); |
305 return false; | 307 return false; |
306 } | 308 } |
307 #endif | 309 #endif |
OLD | NEW |