Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Side by Side Diff: src/core/SkPictureShader.cpp

Issue 1316513002: Change SkShader;asFragmentProcessor signature to no longer take skpaint\grcolor* (Closed) Base URL: https://skia.googlesource.com/skia.git@things
Patch Set: nullptr Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 fPicture ? fPicture->cullRect().fRight : 0, 329 fPicture ? fPicture->cullRect().fRight : 0,
330 fPicture ? fPicture->cullRect().fBottom : 0); 330 fPicture ? fPicture->cullRect().fBottom : 0);
331 331
332 str->appendf("(%s, %s)", gTileModeName[fTmx], gTileModeName[fTmy]); 332 str->appendf("(%s, %s)", gTileModeName[fTmx], gTileModeName[fTmy]);
333 333
334 this->INHERITED::toString(str); 334 this->INHERITED::toString(str);
335 } 335 }
336 #endif 336 #endif
337 337
338 #if SK_SUPPORT_GPU 338 #if SK_SUPPORT_GPU
339 bool SkPictureShader::asFragmentProcessor(GrContext* context, const SkPaint& pai nt, 339 const GrFragmentProcessor* SkPictureShader::asFragmentProcessor(GrContext* conte xt,
robertphillips 2015/08/28 21:33:05 tabs ?
bsalomon 2015/08/29 01:42:50 Done.
340 const SkMatrix& viewM, const SkMatrix* localMatrix, 340 const SkMatrix& viewM, const SkMatrix* localMatrix, SkFilterQuality fq,
341 GrColor* paintColor, 341 GrProcessorDataManager* procDataManager) const {
342 GrProcessorDataManager* procDataManage r,
343 GrFragmentProcessor** fp) const {
344 int maxTextureSize = 0; 342 int maxTextureSize = 0;
345 if (context) { 343 if (context) {
346 maxTextureSize = context->caps()->maxTextureSize(); 344 maxTextureSize = context->caps()->maxTextureSize();
347 } 345 }
348 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix , maxTextureSize)); 346 SkAutoTUnref<SkShader> bitmapShader(this->refBitmapShader(viewM, localMatrix , maxTextureSize));
349 if (!bitmapShader) { 347 if (!bitmapShader) {
350 return false; 348 return nullptr;
351 } 349 }
352 return bitmapShader->asFragmentProcessor(context, paint, viewM, nullptr, pai ntColor, 350 return bitmapShader->asFragmentProcessor(context, viewM, nullptr, fq, procDa taManager);
353 procDataManager, fp);
354 }
355 #else
356 bool SkPictureShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMa trix&,
357 const SkMatrix*, GrColor*, GrProcessor DataManager*,
358 GrFragmentProcessor**) const {
359 SkDEBUGFAIL("Should not call in GPU-less build");
360 return false;
361 } 351 }
362 #endif 352 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698