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

Side by Side Diff: gm/yuvtorgbeffect.cpp

Issue 1471053002: Don't create a GXPFactory when blend is SrcOver (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix compile Created 5 years 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 | « gm/texturedomaineffect.cpp ('k') | include/core/SkXfermode.h » ('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 // This test only works with the GPU backend. 9 // This test only works with the GPU backend.
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 renderRect.outset(kDrawPad, kDrawPad); 108 renderRect.outset(kDrawPad, kDrawPad);
109 109
110 SkScalar y = kDrawPad + kTestPad + space * kColorSpaceOffset; 110 SkScalar y = kDrawPad + kTestPad + space * kColorSpaceOffset;
111 SkScalar x = kDrawPad + kTestPad; 111 SkScalar x = kDrawPad + kTestPad;
112 112
113 const int indices[6][3] = {{0, 1, 2}, {0, 2, 1}, {1, 0, 2}, 113 const int indices[6][3] = {{0, 1, 2}, {0, 2, 1}, {1, 0, 2},
114 {1, 2, 0}, {2, 0, 1}, {2, 1, 0}}; 114 {1, 2, 0}, {2, 0, 1}, {2, 1, 0}};
115 115
116 for (int i = 0; i < 6; ++i) { 116 for (int i = 0; i < 6; ++i) {
117 GrPipelineBuilder pipelineBuilder; 117 GrPipelineBuilder pipelineBuilder;
118 pipelineBuilder.setXPFactory(
119 GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->unref ();
118 SkAutoTUnref<GrFragmentProcessor> fp( 120 SkAutoTUnref<GrFragmentProcessor> fp(
119 GrYUVtoRGBEffect::Create(texture[indices[i][0]], 121 GrYUVtoRGBEffect::Create(texture[indices[i][0]],
120 texture[indices[i][1]], 122 texture[indices[i][1]],
121 texture[indices[i][2]], 123 texture[indices[i][2]],
122 sizes, 124 sizes,
123 static_cast<SkYUVColorSpace >(space))); 125 static_cast<SkYUVColorSpace >(space)));
124 if (fp) { 126 if (fp) {
125 SkMatrix viewMatrix; 127 SkMatrix viewMatrix;
126 viewMatrix.setTranslate(x, y); 128 viewMatrix.setTranslate(x, y);
127 pipelineBuilder.setRenderTarget(rt); 129 pipelineBuilder.setRenderTarget(rt);
(...skipping 11 matching lines...) Expand all
139 private: 141 private:
140 SkBitmap fBmp[3]; 142 SkBitmap fBmp[3];
141 143
142 typedef GM INHERITED; 144 typedef GM INHERITED;
143 }; 145 };
144 146
145 DEF_GM(return new YUVtoRGBEffect;) 147 DEF_GM(return new YUVtoRGBEffect;)
146 } 148 }
147 149
148 #endif 150 #endif
OLDNEW
« no previous file with comments | « gm/texturedomaineffect.cpp ('k') | include/core/SkXfermode.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698