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

Side by Side Diff: src/effects/gradients/Sk4fLinearGradient.cpp

Issue 2086583002: update callers to not use SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rm flag instead of commenting it out Created 4 years, 6 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/SkSpanProcs.cpp ('k') | tests/ColorSpaceTest.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 2016 Google Inc. 2 * Copyright 2016 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 "Sk4fLinearGradient.h" 8 #include "Sk4fLinearGradient.h"
9 #include "Sk4x4f.h" 9 #include "Sk4x4f.h"
10 #include "SkXfermode.h" 10 #include "SkXfermode.h"
(...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 } 441 }
442 } 442 }
443 443
444 void SkLinearGradient:: 444 void SkLinearGradient::
445 LinearGradient4fContext::D32_BlitBW(BlitState* state, int x, int y, const SkPixm ap& dst, 445 LinearGradient4fContext::D32_BlitBW(BlitState* state, int x, int y, const SkPixm ap& dst,
446 int count) { 446 int count) {
447 // FIXME: ignoring coverage for now 447 // FIXME: ignoring coverage for now
448 const LinearGradient4fContext* ctx = 448 const LinearGradient4fContext* ctx =
449 static_cast<const LinearGradient4fContext*>(state->fCtx); 449 static_cast<const LinearGradient4fContext*>(state->fCtx);
450 450
451 if (dst.info().isLinear()) { 451 if (!dst.info().gammaCloseToSRGB()) {
452 if (ctx->fColorsArePremul) { 452 if (ctx->fColorsArePremul) {
453 ctx->shadePremulSpan<DstType::L32, ApplyPremul::False>( 453 ctx->shadePremulSpan<DstType::L32, ApplyPremul::False>(
454 x, y, dst.writable_addr32(x, y), count); 454 x, y, dst.writable_addr32(x, y), count);
455 } else { 455 } else {
456 ctx->shadePremulSpan<DstType::L32, ApplyPremul::True>( 456 ctx->shadePremulSpan<DstType::L32, ApplyPremul::True>(
457 x, y, dst.writable_addr32(x, y), count); 457 x, y, dst.writable_addr32(x, y), count);
458 } 458 }
459 } else { 459 } else {
460 if (ctx->fColorsArePremul) { 460 if (ctx->fColorsArePremul) {
461 ctx->shadePremulSpan<DstType::S32, ApplyPremul::False>( 461 ctx->shadePremulSpan<DstType::S32, ApplyPremul::False>(
(...skipping 13 matching lines...) Expand all
475 static_cast<const LinearGradient4fContext*>(state->fCtx); 475 static_cast<const LinearGradient4fContext*>(state->fCtx);
476 476
477 if (ctx->fColorsArePremul) { 477 if (ctx->fColorsArePremul) {
478 ctx->shadePremulSpan<DstType::F16, ApplyPremul::False>( 478 ctx->shadePremulSpan<DstType::F16, ApplyPremul::False>(
479 x, y, dst.writable_addr64(x, y), count); 479 x, y, dst.writable_addr64(x, y), count);
480 } else { 480 } else {
481 ctx->shadePremulSpan<DstType::F16, ApplyPremul::True>( 481 ctx->shadePremulSpan<DstType::F16, ApplyPremul::True>(
482 x, y, dst.writable_addr64(x, y), count); 482 x, y, dst.writable_addr64(x, y), count);
483 } 483 }
484 } 484 }
OLDNEW
« no previous file with comments | « src/core/SkSpanProcs.cpp ('k') | tests/ColorSpaceTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698