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

Side by Side Diff: gm/rrects.cpp

Issue 1988923002: Remove GrRenderTarget from GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 6 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"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 pipelineBuilder.setXPFactory( 105 pipelineBuilder.setXPFactory(
106 GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode) )->unref(); 106 GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode) )->unref();
107 107
108 SkRRect rrect = fRRects[curRRect]; 108 SkRRect rrect = fRRects[curRRect];
109 rrect.offset(SkIntToScalar(x), SkIntToScalar(y)); 109 rrect.offset(SkIntToScalar(x), SkIntToScalar(y));
110 GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et; 110 GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et;
111 SkAutoTUnref<GrFragmentProcessor> fp(GrRRectEffect::Crea te(edgeType, 111 SkAutoTUnref<GrFragmentProcessor> fp(GrRRectEffect::Crea te(edgeType,
112 rrect)); 112 rrect));
113 if (fp) { 113 if (fp) {
114 pipelineBuilder.addCoverageFragmentProcessor(fp); 114 pipelineBuilder.addCoverageFragmentProcessor(fp);
115 pipelineBuilder.setRenderTarget(drawContext->accessR enderTarget());
116 115
117 SkRect bounds = rrect.getBounds(); 116 SkRect bounds = rrect.getBounds();
118 bounds.outset(2.f, 2.f); 117 bounds.outset(2.f, 2.f);
119 118
120 SkAutoTUnref<GrDrawBatch> batch( 119 SkAutoTUnref<GrDrawBatch> batch(
121 GrRectBatchFactory::CreateNonAAFill(0xff0000 00, SkMatrix::I(), 120 GrRectBatchFactory::CreateNonAAFill(0xff0000 00, SkMatrix::I(),
122 bounds, nullptr, nullptr)); 121 bounds, nullptr, nullptr));
123 drawContext->drawContextPriv().testingOnly_drawBatch (pipelineBuilder, 122 drawContext->drawContextPriv().testingOnly_drawBatch (pipelineBuilder,
124 batch); 123 batch);
125 } else { 124 } else {
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 254
256 DEF_GM( return new RRectGM(RRectGM::kAA_Draw_Type); ) 255 DEF_GM( return new RRectGM(RRectGM::kAA_Draw_Type); )
257 DEF_GM( return new RRectGM(RRectGM::kBW_Draw_Type); ) 256 DEF_GM( return new RRectGM(RRectGM::kBW_Draw_Type); )
258 DEF_GM( return new RRectGM(RRectGM::kAA_Clip_Type); ) 257 DEF_GM( return new RRectGM(RRectGM::kAA_Clip_Type); )
259 DEF_GM( return new RRectGM(RRectGM::kBW_Clip_Type); ) 258 DEF_GM( return new RRectGM(RRectGM::kBW_Clip_Type); )
260 #if SK_SUPPORT_GPU 259 #if SK_SUPPORT_GPU
261 DEF_GM( return new RRectGM(RRectGM::kEffect_Type); ) 260 DEF_GM( return new RRectGM(RRectGM::kEffect_Type); )
262 #endif 261 #endif
263 262
264 } 263 }
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