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

Side by Side Diff: gm/texturedomaineffect.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/rrects.cpp ('k') | gm/yuvtorgbeffect.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 /* 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 "GrDrawContext.h" 15 #include "GrDrawContextPriv.h"
16 #include "GrContext.h" 16 #include "GrContext.h"
17 #include "SkBitmap.h" 17 #include "SkBitmap.h"
18 #include "SkGr.h" 18 #include "SkGr.h"
19 #include "SkGradientShader.h" 19 #include "SkGradientShader.h"
20 #include "batches/GrDrawBatch.h" 20 #include "batches/GrDrawBatch.h"
21 #include "batches/GrRectBatchFactory.h" 21 #include "batches/GrRectBatchFactory.h"
22 #include "effects/GrTextureDomain.h" 22 #include "effects/GrTextureDomain.h"
23 23
24 namespace skiagm { 24 namespace skiagm {
25 /** 25 /**
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 if (!fp) { 128 if (!fp) {
129 continue; 129 continue;
130 } 130 }
131 const SkMatrix viewMatrix = SkMatrix::MakeTrans(x, y); 131 const SkMatrix viewMatrix = SkMatrix::MakeTrans(x, y);
132 pipelineBuilder.setRenderTarget(rt); 132 pipelineBuilder.setRenderTarget(rt);
133 pipelineBuilder.addColorFragmentProcessor(fp); 133 pipelineBuilder.addColorFragmentProcessor(fp);
134 134
135 SkAutoTUnref<GrDrawBatch> batch( 135 SkAutoTUnref<GrDrawBatch> batch(
136 GrRectBatchFactory::CreateNonAAFill(GrColor_WHITE, v iewMatrix, 136 GrRectBatchFactory::CreateNonAAFill(GrColor_WHITE, v iewMatrix,
137 renderRect, null ptr, nullptr)); 137 renderRect, null ptr, nullptr));
138 drawContext->internal_drawBatch(pipelineBuilder, batch); 138 drawContext->drawContextPriv().testingOnly_drawBatch(pipelin eBuilder, batch);
139 x += renderRect.width() + kTestPad; 139 x += renderRect.width() + kTestPad;
140 } 140 }
141 y += renderRect.height() + kTestPad; 141 y += renderRect.height() + kTestPad;
142 } 142 }
143 } 143 }
144 } 144 }
145 145
146 private: 146 private:
147 static const SkScalar kDrawPad; 147 static const SkScalar kDrawPad;
148 static const SkScalar kTestPad; 148 static const SkScalar kTestPad;
149 static const int kTargetWidth = 100; 149 static const int kTargetWidth = 100;
150 static const int kTargetHeight = 100; 150 static const int kTargetHeight = 100;
151 SkBitmap fBmp; 151 SkBitmap fBmp;
152 152
153 typedef GM INHERITED; 153 typedef GM INHERITED;
154 }; 154 };
155 155
156 // Windows builds did not like SkScalar initialization in class :( 156 // Windows builds did not like SkScalar initialization in class :(
157 const SkScalar TextureDomainEffect::kDrawPad = 10.f; 157 const SkScalar TextureDomainEffect::kDrawPad = 10.f;
158 const SkScalar TextureDomainEffect::kTestPad = 10.f; 158 const SkScalar TextureDomainEffect::kTestPad = 10.f;
159 159
160 DEF_GM(return new TextureDomainEffect;) 160 DEF_GM(return new TextureDomainEffect;)
161 } 161 }
162 162
163 #endif 163 #endif
OLDNEW
« no previous file with comments | « gm/rrects.cpp ('k') | gm/yuvtorgbeffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698