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

Side by Side Diff: gm/rrects.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/convexpolyeffect.cpp ('k') | gm/texturedomaineffect.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 2012 Google Inc. 2 * Copyright 2012 Google Inc.
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 "gm.h" 8 #include "gm.h"
9 #if SK_SUPPORT_GPU 9 #if SK_SUPPORT_GPU
10 #include "GrContext.h" 10 #include "GrContext.h"
11 #include "GrDrawContext.h" 11 #include "GrDrawContextPriv.h"
12 #include "batches/GrDrawBatch.h" 12 #include "batches/GrDrawBatch.h"
13 #include "batches/GrRectBatchFactory.h" 13 #include "batches/GrRectBatchFactory.h"
14 #include "effects/GrRRectEffect.h" 14 #include "effects/GrRRectEffect.h"
15 #endif 15 #endif
16 #include "SkDevice.h" 16 #include "SkDevice.h"
17 #include "SkRRect.h" 17 #include "SkRRect.h"
18 18
19 namespace skiagm { 19 namespace skiagm {
20 20
21 /////////////////////////////////////////////////////////////////////////////// 21 ///////////////////////////////////////////////////////////////////////////////
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 if (fp) { 130 if (fp) {
131 pipelineBuilder.addCoverageFragmentProcessor(fp); 131 pipelineBuilder.addCoverageFragmentProcessor(fp);
132 pipelineBuilder.setRenderTarget(rt); 132 pipelineBuilder.setRenderTarget(rt);
133 133
134 SkRect bounds = rrect.getBounds(); 134 SkRect bounds = rrect.getBounds();
135 bounds.outset(2.f, 2.f); 135 bounds.outset(2.f, 2.f);
136 136
137 SkAutoTUnref<GrDrawBatch> batch( 137 SkAutoTUnref<GrDrawBatch> batch(
138 GrRectBatchFactory::CreateNonAAFill(0xff0000 00, SkMatrix::I(), 138 GrRectBatchFactory::CreateNonAAFill(0xff0000 00, SkMatrix::I(),
139 bounds, nullptr, nullptr)); 139 bounds, nullptr, nullptr));
140 drawContext->internal_drawBatch(pipelineBuilder, bat ch); 140 drawContext->drawContextPriv().testingOnly_drawBatch (pipelineBuilder,
141 batch);
141 } else { 142 } else {
142 drew = false; 143 drew = false;
143 } 144 }
144 #endif 145 #endif
145 } else if (kBW_Clip_Type == fType || kAA_Clip_Type == fType) { 146 } else if (kBW_Clip_Type == fType || kAA_Clip_Type == fType) {
146 bool aaClip = (kAA_Clip_Type == fType); 147 bool aaClip = (kAA_Clip_Type == fType);
147 canvas->clipRRect(fRRects[curRRect], SkRegion::kReplace_ Op, aaClip); 148 canvas->clipRRect(fRRects[curRRect], SkRegion::kReplace_ Op, aaClip);
148 canvas->drawRect(kMaxTileBound, paint); 149 canvas->drawRect(kMaxTileBound, paint);
149 } else { 150 } else {
150 canvas->drawRRect(fRRects[curRRect], paint); 151 canvas->drawRRect(fRRects[curRRect], paint);
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 272
272 DEF_GM( return new RRectGM(RRectGM::kAA_Draw_Type); ) 273 DEF_GM( return new RRectGM(RRectGM::kAA_Draw_Type); )
273 DEF_GM( return new RRectGM(RRectGM::kBW_Draw_Type); ) 274 DEF_GM( return new RRectGM(RRectGM::kBW_Draw_Type); )
274 DEF_GM( return new RRectGM(RRectGM::kAA_Clip_Type); ) 275 DEF_GM( return new RRectGM(RRectGM::kAA_Clip_Type); )
275 DEF_GM( return new RRectGM(RRectGM::kBW_Clip_Type); ) 276 DEF_GM( return new RRectGM(RRectGM::kBW_Clip_Type); )
276 #if SK_SUPPORT_GPU 277 #if SK_SUPPORT_GPU
277 DEF_GM( return new RRectGM(RRectGM::kEffect_Type); ) 278 DEF_GM( return new RRectGM(RRectGM::kEffect_Type); )
278 #endif 279 #endif
279 280
280 } 281 }
OLDNEW
« no previous file with comments | « gm/convexpolyeffect.cpp ('k') | gm/texturedomaineffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698