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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 | 311 |
312 this->INHERITED::toString(str); | 312 this->INHERITED::toString(str); |
313 } | 313 } |
314 #endif | 314 #endif |
315 | 315 |
316 #if SK_SUPPORT_GPU | 316 #if SK_SUPPORT_GPU |
317 const GrFragmentProcessor* SkPictureShader::asFragmentProcessor( | 317 const GrFragmentProcessor* SkPictureShader::asFragmentProcessor( |
318 GrContext* context, | 318 GrContext* context, |
319 const SkMatrix& viewM, | 319 const SkMatrix& viewM, |
320 const SkMatrix* localMatrix, | 320 const SkMatrix* localMatrix, |
321 SkFilterQuality fq) const { | 321 SkFilterQuality fq, |
| 322 GrRenderTarget* dst) const { |
322 int maxTextureSize = 0; | 323 int maxTextureSize = 0; |
323 if (context) { | 324 if (context) { |
324 maxTextureSize = context->caps()->maxTextureSize(); | 325 maxTextureSize = context->caps()->maxTextureSize(); |
325 } | 326 } |
326 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix
, maxTextureSize)); | 327 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix
, maxTextureSize)); |
327 if (!bitmapShader) { | 328 if (!bitmapShader) { |
328 return nullptr; | 329 return nullptr; |
329 } | 330 } |
330 return bitmapShader->asFragmentProcessor(context, viewM, nullptr, fq); | 331 return bitmapShader->asFragmentProcessor(context, viewM, nullptr, fq, dst); |
331 } | 332 } |
332 #endif | 333 #endif |
OLD | NEW |