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

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

Issue 1228683002: rename GrShaderDataManager -> GrProcessorDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@grfixuptests
Patch Set: rebase onto origin/master Created 5 years, 5 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
« no previous file with comments | « src/core/SkPictureShader.cpp ('k') | src/core/SkXfermode.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 "SkAtomics.h" 8 #include "SkAtomics.h"
9 #include "SkBitmapProcShader.h" 9 #include "SkBitmapProcShader.h"
10 #include "SkColorShader.h" 10 #include "SkColorShader.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 208
209 SkShader::BitmapType SkShader::asABitmap(SkBitmap*, SkMatrix*, TileMode*) const { 209 SkShader::BitmapType SkShader::asABitmap(SkBitmap*, SkMatrix*, TileMode*) const {
210 return kNone_BitmapType; 210 return kNone_BitmapType;
211 } 211 }
212 212
213 SkShader::GradientType SkShader::asAGradient(GradientInfo* info) const { 213 SkShader::GradientType SkShader::asAGradient(GradientInfo* info) const {
214 return kNone_GradientType; 214 return kNone_GradientType;
215 } 215 }
216 216
217 bool SkShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix&, const SkMatrix*, 217 bool SkShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix&, const SkMatrix*,
218 GrColor*, GrShaderDataManager*, GrFragmentPro cessor**) const { 218 GrColor*, GrProcessorDataManager*,
219 GrFragmentProcessor**) const {
219 return false; 220 return false;
220 } 221 }
221 222
222 SkShader* SkShader::refAsALocalMatrixShader(SkMatrix*) const { 223 SkShader* SkShader::refAsALocalMatrixShader(SkMatrix*) const {
223 return NULL; 224 return NULL;
224 } 225 }
225 226
226 SkShader* SkShader::CreateEmptyShader() { 227 SkShader* SkShader::CreateEmptyShader() {
227 return SkNEW(SkEmptyShader); 228 return SkNEW(SkEmptyShader);
228 } 229 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 info->fTileMode = SkShader::kRepeat_TileMode; 340 info->fTileMode = SkShader::kRepeat_TileMode;
340 } 341 }
341 return kColor_GradientType; 342 return kColor_GradientType;
342 } 343 }
343 344
344 #if SK_SUPPORT_GPU 345 #if SK_SUPPORT_GPU
345 346
346 #include "SkGr.h" 347 #include "SkGr.h"
347 348
348 bool SkColorShader::asFragmentProcessor(GrContext*, const SkPaint& paint, const SkMatrix&, 349 bool SkColorShader::asFragmentProcessor(GrContext*, const SkPaint& paint, const SkMatrix&,
349 const SkMatrix*, GrColor* paintColor, Gr ShaderDataManager*, 350 const SkMatrix*, GrColor* paintColor,
350 GrFragmentProcessor** fp) const { 351 GrProcessorDataManager*, GrFragmentProce ssor** fp) const {
351 *fp = NULL; 352 *fp = NULL;
352 SkColor skColor = fColor; 353 SkColor skColor = fColor;
353 U8CPU newA = SkMulDiv255Round(SkColorGetA(fColor), paint.getAlpha()); 354 U8CPU newA = SkMulDiv255Round(SkColorGetA(fColor), paint.getAlpha());
354 *paintColor = SkColor2GrColor(SkColorSetA(skColor, newA)); 355 *paintColor = SkColor2GrColor(SkColorSetA(skColor, newA));
355 return true; 356 return true;
356 } 357 }
357 358
358 #else 359 #else
359 360
360 bool SkColorShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMatr ix&, 361 bool SkColorShader::asFragmentProcessor(GrContext*, const SkPaint&, const SkMatr ix&,
361 const SkMatrix*, GrColor*, GrShaderDataM anager*, 362 const SkMatrix*, GrColor*, GrProcessorDa taManager*,
362 GrFragmentProcessor**) const { 363 GrFragmentProcessor**) const {
363 SkDEBUGFAIL("Should not call in GPU-less build"); 364 SkDEBUGFAIL("Should not call in GPU-less build");
364 return false; 365 return false;
365 } 366 }
366 367
367 #endif 368 #endif
368 369
369 #ifndef SK_IGNORE_TO_STRING 370 #ifndef SK_IGNORE_TO_STRING
370 void SkColorShader::toString(SkString* str) const { 371 void SkColorShader::toString(SkString* str) const {
371 str->append("SkColorShader: ("); 372 str->append("SkColorShader: (");
(...skipping 17 matching lines...) Expand all
389 #include "SkEmptyShader.h" 390 #include "SkEmptyShader.h"
390 391
391 void SkEmptyShader::toString(SkString* str) const { 392 void SkEmptyShader::toString(SkString* str) const {
392 str->append("SkEmptyShader: ("); 393 str->append("SkEmptyShader: (");
393 394
394 this->INHERITED::toString(str); 395 this->INHERITED::toString(str);
395 396
396 str->append(")"); 397 str->append(")");
397 } 398 }
398 #endif 399 #endif
OLDNEW
« no previous file with comments | « src/core/SkPictureShader.cpp ('k') | src/core/SkXfermode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698