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

Side by Side Diff: src/effects/SkColorFilters.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/effects/SkColorCubeFilter.cpp ('k') | src/effects/SkColorMatrixFilter.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 "SkBlitRow.h" 8 #include "SkBlitRow.h"
9 #include "SkColorFilter.h" 9 #include "SkColorFilter.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 352
353 // pick a random premul color 353 // pick a random premul color
354 uint8_t alpha = d->fRandom->nextULessThan(256); 354 uint8_t alpha = d->fRandom->nextULessThan(256);
355 GrColor color = GrColorPackRGBA(d->fRandom->nextRangeU(0, alpha), 355 GrColor color = GrColorPackRGBA(d->fRandom->nextRangeU(0, alpha),
356 d->fRandom->nextRangeU(0, alpha), 356 d->fRandom->nextRangeU(0, alpha),
357 d->fRandom->nextRangeU(0, alpha), 357 d->fRandom->nextRangeU(0, alpha),
358 alpha); 358 alpha);
359 return ModeColorFilterEffect::Create(color, mode); 359 return ModeColorFilterEffect::Create(color, mode);
360 } 360 }
361 361
362 bool SkModeColorFilter::asFragmentProcessors(GrContext*, GrShaderDataManager*, 362 bool SkModeColorFilter::asFragmentProcessors(GrContext*, GrProcessorDataManager* ,
363 SkTDArray<GrFragmentProcessor*>* ar ray) const { 363 SkTDArray<GrFragmentProcessor*>* ar ray) const {
364 if (SkXfermode::kDst_Mode != fMode) { 364 if (SkXfermode::kDst_Mode != fMode) {
365 GrFragmentProcessor* frag = ModeColorFilterEffect::Create(SkColor2GrColo r(fColor), fMode); 365 GrFragmentProcessor* frag = ModeColorFilterEffect::Create(SkColor2GrColo r(fColor), fMode);
366 if (frag) { 366 if (frag) {
367 if (array) { 367 if (array) {
368 *array->append() = frag; 368 *array->append() = frag;
369 } else { 369 } else {
370 frag->unref(); 370 frag->unref();
371 SkDEBUGCODE(frag = NULL;) 371 SkDEBUGCODE(frag = NULL;)
372 } 372 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 byte_to_scale(SkColorGetG(mul)), 466 byte_to_scale(SkColorGetG(mul)),
467 byte_to_scale(SkColorGetB(mul)), 467 byte_to_scale(SkColorGetB(mul)),
468 1); 468 1);
469 matrix.postTranslate(SkIntToScalar(SkColorGetR(add)), 469 matrix.postTranslate(SkIntToScalar(SkColorGetR(add)),
470 SkIntToScalar(SkColorGetG(add)), 470 SkIntToScalar(SkColorGetG(add)),
471 SkIntToScalar(SkColorGetB(add)), 471 SkIntToScalar(SkColorGetB(add)),
472 0); 472 0);
473 return SkColorMatrixFilter::Create(matrix); 473 return SkColorMatrixFilter::Create(matrix);
474 } 474 }
475 475
OLDNEW
« no previous file with comments | « src/effects/SkColorCubeFilter.cpp ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698