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

Side by Side Diff: gm/rrects.cpp

Issue 777643003: use ClipOp instead of SkRegion for clipping (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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/pathopsskpclip.cpp ('k') | gm/samplerstress.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 "GrTest.h" 10 #include "GrTest.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 SkRect bounds = rrect.getBounds(); 128 SkRect bounds = rrect.getBounds();
129 bounds.outset(2.f, 2.f); 129 bounds.outset(2.f, 2.f);
130 130
131 tt.target()->drawSimpleRect(&drawState, bounds); 131 tt.target()->drawSimpleRect(&drawState, bounds);
132 } else { 132 } else {
133 drew = false; 133 drew = false;
134 } 134 }
135 #endif 135 #endif
136 } else if (kBW_Clip_Type == fType || kAA_Clip_Type == fType) { 136 } else if (kBW_Clip_Type == fType || kAA_Clip_Type == fType) {
137 bool aaClip = (kAA_Clip_Type == fType); 137 bool aaClip = (kAA_Clip_Type == fType);
138 canvas->clipRRect(fRRects[curRRect], SkRegion::kReplace_ Op, aaClip); 138 canvas->legacyClipRRect(fRRects[curRRect], SkRegion::kRe place_Op, aaClip);
139 canvas->drawRect(kMaxTileBound, paint); 139 canvas->drawRect(kMaxTileBound, paint);
140 } else { 140 } else {
141 canvas->drawRRect(fRRects[curRRect], paint); 141 canvas->drawRRect(fRRects[curRRect], paint);
142 } 142 }
143 canvas->restore(); 143 canvas->restore();
144 if (drew) { 144 if (drew) {
145 x = x + kTileX; 145 x = x + kTileX;
146 if (x > kImageWidth) { 146 if (x > kImageWidth) {
147 x = 1; 147 x = 1;
148 y += kTileY; 148 y += kTileY;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 DEF_GM( return new RRectGM(RRectGM::kAA_Draw_Type); ) 263 DEF_GM( return new RRectGM(RRectGM::kAA_Draw_Type); )
264 DEF_GM( return new RRectGM(RRectGM::kBW_Draw_Type); ) 264 DEF_GM( return new RRectGM(RRectGM::kBW_Draw_Type); )
265 DEF_GM( return new RRectGM(RRectGM::kAA_Clip_Type); ) 265 DEF_GM( return new RRectGM(RRectGM::kAA_Clip_Type); )
266 DEF_GM( return new RRectGM(RRectGM::kBW_Clip_Type); ) 266 DEF_GM( return new RRectGM(RRectGM::kBW_Clip_Type); )
267 #if SK_SUPPORT_GPU 267 #if SK_SUPPORT_GPU
268 DEF_GM( return new RRectGM(RRectGM::kEffect_Type); ) 268 DEF_GM( return new RRectGM(RRectGM::kEffect_Type); )
269 #endif 269 #endif
270 270
271 } 271 }
OLDNEW
« no previous file with comments | « gm/pathopsskpclip.cpp ('k') | gm/samplerstress.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698