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 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 7 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 /////////////////////////////////////////////////////////////////////////////// 65 ///////////////////////////////////////////////////////////////////////////////
66 #if SK_SUPPORT_GPU 66 #if SK_SUPPORT_GPU
67 #include "GrBlend.h" 67 #include "GrBlend.h"
68 #include "GrInvariantOutput.h" 68 #include "GrInvariantOutput.h"
69 #include "effects/GrXfermodeFragmentProcessor.h" 69 #include "effects/GrXfermodeFragmentProcessor.h"
70 #include "effects/GrConstColorProcessor.h" 70 #include "effects/GrConstColorProcessor.h"
71 #include "SkGr.h" 71 #include "SkGr.h"
72 72
73 const GrFragmentProcessor* SkModeColorFilter::asFragmentProcessor(GrContext*) co nst { 73 const GrFragmentProcessor* SkModeColorFilter::asFragmentProcessor(GrContext*,
74 GrRenderTarget * dst) const {
74 if (SkXfermode::kDst_Mode == fMode) { 75 if (SkXfermode::kDst_Mode == fMode) {
75 return nullptr; 76 return nullptr;
76 } 77 }
77 78
78 SkAutoTUnref<const GrFragmentProcessor> constFP( 79 SkAutoTUnref<const GrFragmentProcessor> constFP(
79 GrConstColorProcessor::Create(SkColorToPremulGrColor(fColor), 80 GrConstColorProcessor::Create(SkColorToPremulGrColor(fColor),
80 GrConstColorProcessor::kIgnore_InputMode )); 81 GrConstColorProcessor::kIgnore_InputMode ));
81 const GrFragmentProcessor* fp = 82 const GrFragmentProcessor* fp =
82 GrXfermodeFragmentProcessor::CreateFromSrcProcessor(constFP, fMode); 83 GrXfermodeFragmentProcessor::CreateFromSrcProcessor(constFP, fMode);
83 if (!fp) { 84 if (!fp) {
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 byte_to_scale(SkColorGetG(mul)), 188 byte_to_scale(SkColorGetG(mul)),
188 byte_to_scale(SkColorGetB(mul)), 189 byte_to_scale(SkColorGetB(mul)),
189 1); 190 1);
190 matrix.postTranslate(SkIntToScalar(SkColorGetR(add)), 191 matrix.postTranslate(SkIntToScalar(SkColorGetR(add)),
191 SkIntToScalar(SkColorGetG(add)), 192 SkIntToScalar(SkColorGetG(add)),
192 SkIntToScalar(SkColorGetB(add)), 193 SkIntToScalar(SkColorGetB(add)),
193 0); 194 0);
194 return SkColorMatrixFilter::Create(matrix); 195 return SkColorMatrixFilter::Create(matrix);
195 } 196 }
196 197
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