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

Side by Side Diff: gm/yuvtorgbeffect.cpp

Issue 1754563003: Begin weaning GrClipMaskManager off of GrDrawTarget (take 2) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix fAuditTrail uses Created 4 years, 9 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 | « gm/texturedomaineffect.cpp ('k') | 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 // This test only works with the GPU backend. 9 // This test only works with the GPU backend.
10 10
11 #include "gm.h" 11 #include "gm.h"
12 12
13 #if SK_SUPPORT_GPU 13 #if SK_SUPPORT_GPU
14 14
15 #include "GrContext.h" 15 #include "GrContext.h"
16 #include "GrDrawContext.h" 16 #include "GrDrawContextPriv.h"
17 #include "GrPipelineBuilder.h" 17 #include "GrPipelineBuilder.h"
18 #include "SkBitmap.h" 18 #include "SkBitmap.h"
19 #include "SkGr.h" 19 #include "SkGr.h"
20 #include "SkGradientShader.h" 20 #include "SkGradientShader.h"
21 #include "batches/GrDrawBatch.h" 21 #include "batches/GrDrawBatch.h"
22 #include "batches/GrRectBatchFactory.h" 22 #include "batches/GrRectBatchFactory.h"
23 #include "effects/GrYUVEffect.h" 23 #include "effects/GrYUVEffect.h"
24 24
25 #define YSIZE 8 25 #define YSIZE 8
26 #define USIZE 4 26 #define USIZE 4
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 sizes, 125 sizes,
126 static_cast<SkYUVColorSp ace>(space))); 126 static_cast<SkYUVColorSp ace>(space)));
127 if (fp) { 127 if (fp) {
128 SkMatrix viewMatrix; 128 SkMatrix viewMatrix;
129 viewMatrix.setTranslate(x, y); 129 viewMatrix.setTranslate(x, y);
130 pipelineBuilder.setRenderTarget(rt); 130 pipelineBuilder.setRenderTarget(rt);
131 pipelineBuilder.addColorFragmentProcessor(fp); 131 pipelineBuilder.addColorFragmentProcessor(fp);
132 SkAutoTUnref<GrDrawBatch> batch( 132 SkAutoTUnref<GrDrawBatch> batch(
133 GrRectBatchFactory::CreateNonAAFill(GrColor_WHITE, v iewMatrix, 133 GrRectBatchFactory::CreateNonAAFill(GrColor_WHITE, v iewMatrix,
134 renderRect, null ptr, nullptr)); 134 renderRect, null ptr, nullptr));
135 drawContext->internal_drawBatch(pipelineBuilder, batch); 135 drawContext->drawContextPriv().testingOnly_drawBatch(pipelin eBuilder, batch);
136 } 136 }
137 x += renderRect.width() + kTestPad; 137 x += renderRect.width() + kTestPad;
138 } 138 }
139 } 139 }
140 } 140 }
141 141
142 private: 142 private:
143 SkBitmap fBmp[3]; 143 SkBitmap fBmp[3];
144 144
145 typedef GM INHERITED; 145 typedef GM INHERITED;
146 }; 146 };
147 147
148 DEF_GM(return new YUVtoRGBEffect;) 148 DEF_GM(return new YUVtoRGBEffect;)
149 } 149 }
150 150
151 #endif 151 #endif
OLDNEW
« no previous file with comments | « gm/texturedomaineffect.cpp ('k') | gyp/gpu.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698