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

Side by Side Diff: gm/dcshader.cpp

Issue 1347943003: Replace GrExtractAlphaFragmentProcessor with DstIn compose processor (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update comment Created 5 years, 3 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 | « no previous file | gyp/gpu.gypi » ('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 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #include "gm.h" 9 #include "gm.h"
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
11 #include "GrFragmentProcessor.h" 11 #include "GrFragmentProcessor.h"
12 #include "GrCoordTransform.h" 12 #include "GrCoordTransform.h"
13 #include "effects/GrExtractAlphaFragmentProcessor.h" 13 #include "effects/GrXfermodeFragmentProcessor.h"
14 #include "gl/GrGLProcessor.h" 14 #include "gl/GrGLProcessor.h"
15 #include "gl/builders/GrGLProgramBuilder.h" 15 #include "gl/builders/GrGLProgramBuilder.h"
16 #include "Resources.h" 16 #include "Resources.h"
17 #include "SkReadBuffer.h" 17 #include "SkReadBuffer.h"
18 #include "SkShader.h" 18 #include "SkShader.h"
19 #include "SkStream.h" 19 #include "SkStream.h"
20 #include "SkTypeface.h" 20 #include "SkTypeface.h"
21 #include "SkWriteBuffer.h" 21 #include "SkWriteBuffer.h"
22 22
23 namespace skiagm { 23 namespace skiagm {
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 GrCoordTransform fDeviceTransform; 97 GrCoordTransform fDeviceTransform;
98 }; 98 };
99 99
100 const GrFragmentProcessor* DCShader::asFragmentProcessor( 100 const GrFragmentProcessor* DCShader::asFragmentProcessor(
101 GrContext*, 101 GrContext*,
102 const SkMatrix& viewM, 102 const SkMatrix& viewM,
103 const SkMatrix* localMatrix, 103 const SkMatrix* localMatrix,
104 SkFilterQuality, 104 SkFilterQuality,
105 GrProcessorDataManager* procDat aManager) const { 105 GrProcessorDataManager* procDat aManager) const {
106 SkAutoTUnref<const GrFragmentProcessor> inner(new DCFP(procDataManager, fDev iceMatrix)); 106 SkAutoTUnref<const GrFragmentProcessor> inner(new DCFP(procDataManager, fDev iceMatrix));
107 return GrExtractAlphaFragmentProcessor::Create(inner); 107 return GrFragmentProcessor::MulOuputByInputAlpha(inner);
108 } 108 }
109 109
110 class DCShaderGM : public GM { 110 class DCShaderGM : public GM {
111 public: 111 public:
112 DCShaderGM() { 112 DCShaderGM() {
113 this->setBGColor(sk_tool_utils::color_to_565(0xFFAABBCC)); 113 this->setBGColor(sk_tool_utils::color_to_565(0xFFAABBCC));
114 } 114 }
115 115
116 ~DCShaderGM() override { 116 ~DCShaderGM() override {
117 for (int i = 0; i < fPrims.count(); ++i) { 117 for (int i = 0; i < fPrims.count(); ++i) {
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 }; 291 };
292 292
293 SkTArray<Prim*> fPrims; 293 SkTArray<Prim*> fPrims;
294 294
295 typedef GM INHERITED; 295 typedef GM INHERITED;
296 }; 296 };
297 297
298 DEF_GM(return new DCShaderGM;) 298 DEF_GM(return new DCShaderGM;)
299 } 299 }
300 #endif 300 #endif
OLDNEW
« no previous file with comments | « no previous file | gyp/gpu.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698