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

Side by Side Diff: src/effects/SkColorFilters.cpp

Issue 1213613016: More threading of GrShaderDataManager (Closed) Base URL: https://skia.googlesource.com/skia.git@GrShaderDataManager
Patch Set: build issue 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 355
356 // pick a random premul color 356 // pick a random premul color
357 uint8_t alpha = rand->nextULessThan(256); 357 uint8_t alpha = rand->nextULessThan(256);
358 GrColor color = GrColorPackRGBA(rand->nextRangeU(0, alpha), 358 GrColor color = GrColorPackRGBA(rand->nextRangeU(0, alpha),
359 rand->nextRangeU(0, alpha), 359 rand->nextRangeU(0, alpha),
360 rand->nextRangeU(0, alpha), 360 rand->nextRangeU(0, alpha),
361 alpha); 361 alpha);
362 return ModeColorFilterEffect::Create(color, mode); 362 return ModeColorFilterEffect::Create(color, mode);
363 } 363 }
364 364
365 bool SkModeColorFilter::asFragmentProcessors(GrContext*, 365 bool SkModeColorFilter::asFragmentProcessors(GrContext*, GrShaderDataManager*,
366 SkTDArray<GrFragmentProcessor*>* ar ray) const { 366 SkTDArray<GrFragmentProcessor*>* ar ray) const {
367 if (SkXfermode::kDst_Mode != fMode) { 367 if (SkXfermode::kDst_Mode != fMode) {
368 GrFragmentProcessor* frag = ModeColorFilterEffect::Create(SkColor2GrColo r(fColor), fMode); 368 GrFragmentProcessor* frag = ModeColorFilterEffect::Create(SkColor2GrColo r(fColor), fMode);
369 if (frag) { 369 if (frag) {
370 if (array) { 370 if (array) {
371 *array->append() = frag; 371 *array->append() = frag;
372 } else { 372 } else {
373 frag->unref(); 373 frag->unref();
374 SkDEBUGCODE(frag = NULL;) 374 SkDEBUGCODE(frag = NULL;)
375 } 375 }
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 byte_to_scale(SkColorGetG(mul)), 469 byte_to_scale(SkColorGetG(mul)),
470 byte_to_scale(SkColorGetB(mul)), 470 byte_to_scale(SkColorGetB(mul)),
471 1); 471 1);
472 matrix.postTranslate(SkIntToScalar(SkColorGetR(add)), 472 matrix.postTranslate(SkIntToScalar(SkColorGetR(add)),
473 SkIntToScalar(SkColorGetG(add)), 473 SkIntToScalar(SkColorGetG(add)),
474 SkIntToScalar(SkColorGetB(add)), 474 SkIntToScalar(SkColorGetB(add)),
475 0); 475 0);
476 return SkColorMatrixFilter::Create(matrix); 476 return SkColorMatrixFilter::Create(matrix);
477 } 477 }
478 478
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