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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 fPicture ? fPicture->width() : 0, | 185 fPicture ? fPicture->width() : 0, |
186 fPicture ? fPicture->height() : 0); | 186 fPicture ? fPicture->height() : 0); |
187 | 187 |
188 str->appendf("(%s, %s)", gTileModeName[fTmx], gTileModeName[fTmy]); | 188 str->appendf("(%s, %s)", gTileModeName[fTmx], gTileModeName[fTmy]); |
189 | 189 |
190 this->INHERITED::toString(str); | 190 this->INHERITED::toString(str); |
191 } | 191 } |
192 #endif | 192 #endif |
193 | 193 |
194 #if SK_SUPPORT_GPU | 194 #if SK_SUPPORT_GPU |
195 GrEffectRef* SkPictureShader::asNewEffect(GrContext* context, const SkPaint& pai
nt) const { | 195 GrEffectRef* SkPictureShader::asNewEffect(GrContext* context, const SkPaint& pai
nt, |
196 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(context->getMatrix
(), NULL)); | 196 const SkMatrix* localMatrix) const { |
| 197 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(context->getMatrix
(), localMatrix)); |
197 if (!bitmapShader) { | 198 if (!bitmapShader) { |
198 return NULL; | 199 return NULL; |
199 } | 200 } |
200 return bitmapShader->asNewEffect(context, paint); | 201 return bitmapShader->asNewEffect(context, paint, NULL); |
201 } | 202 } |
202 #endif | 203 #endif |
OLD | NEW |