| 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, | 321 SkFilterQuality fq) const { |
| 322 GrProcessorDataManager* proc
DataManager) const { | |
| 323 int maxTextureSize = 0; | 322 int maxTextureSize = 0; |
| 324 if (context) { | 323 if (context) { |
| 325 maxTextureSize = context->caps()->maxTextureSize(); | 324 maxTextureSize = context->caps()->maxTextureSize(); |
| 326 } | 325 } |
| 327 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix
, maxTextureSize)); | 326 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix
, maxTextureSize)); |
| 328 if (!bitmapShader) { | 327 if (!bitmapShader) { |
| 329 return nullptr; | 328 return nullptr; |
| 330 } | 329 } |
| 331 return bitmapShader->asFragmentProcessor(context, viewM, nullptr, fq, procDa
taManager); | 330 return bitmapShader->asFragmentProcessor(context, viewM, nullptr, fq); |
| 332 } | 331 } |
| 333 #endif | 332 #endif |
| OLD | NEW |