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

Side by Side Diff: gm/rrects.cpp

Issue 193263002: Handle rrects with one circular corner and three square corners in GrRRectEffect. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase on tot to land Created 6 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 | Annotate | Revision Log
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | src/gpu/effects/GrRRectEffect.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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 private: 182 private:
183 Type fType; 183 Type fType;
184 184
185 static const int kImageWidth = 640; 185 static const int kImageWidth = 640;
186 static const int kImageHeight = 480; 186 static const int kImageHeight = 480;
187 187
188 static const int kTileX = 80; 188 static const int kTileX = 80;
189 static const int kTileY = 40; 189 static const int kTileY = 40;
190 190
191 static const int kNumSimpleCases = 7; 191 static const int kNumSimpleCases = 7;
192 static const int kNumComplexCases = 23; 192 static const int kNumComplexCases = 27;
193 static const SkVector gRadii[kNumComplexCases][4]; 193 static const SkVector gRadii[kNumComplexCases][4];
194 194
195 static const int kNumRRects = kNumSimpleCases + kNumComplexCases; 195 static const int kNumRRects = kNumSimpleCases + kNumComplexCases;
196 SkRRect fRRects[kNumRRects]; 196 SkRRect fRRects[kNumRRects];
197 197
198 typedef GM INHERITED; 198 typedef GM INHERITED;
199 }; 199 };
200 200
201 // Radii for the various test cases. Order is UL, UR, LR, LL 201 // Radii for the various test cases. Order is UL, UR, LR, LL
202 const SkVector RRectGM::gRadii[kNumComplexCases][4] = { 202 const SkVector RRectGM::gRadii[kNumComplexCases][4] = {
(...skipping 28 matching lines...) Expand all
231 // over-sized radii 231 // over-sized radii
232 { { 0, 0 }, { 100, 400 }, { 0, 0 }, { 0, 0 } }, 232 { { 0, 0 }, { 100, 400 }, { 0, 0 }, { 0, 0 } },
233 { { 0, 0 }, { 400, 400 }, { 0, 0 }, { 0, 0 } }, 233 { { 0, 0 }, { 400, 400 }, { 0, 0 }, { 0, 0 } },
234 { { 400, 400 }, { 400, 400 }, { 400, 400 }, { 400, 400 } }, 234 { { 400, 400 }, { 400, 400 }, { 400, 400 }, { 400, 400 } },
235 235
236 // circular corner tabs 236 // circular corner tabs
237 { { 0, 0 }, { 20, 20 }, { 20, 20 }, { 0, 0 } }, 237 { { 0, 0 }, { 20, 20 }, { 20, 20 }, { 0, 0 } },
238 { { 20, 20 }, { 20, 20 }, { 0, 0 }, { 0, 0 } }, 238 { { 20, 20 }, { 20, 20 }, { 0, 0 }, { 0, 0 } },
239 { { 0, 0 }, { 0, 0 }, { 20, 20 }, { 20, 20 } }, 239 { { 0, 0 }, { 0, 0 }, { 20, 20 }, { 20, 20 } },
240 { { 20, 20 }, { 0, 0 }, { 0, 0 }, { 20, 20 } }, 240 { { 20, 20 }, { 0, 0 }, { 0, 0 }, { 20, 20 } },
241
242 // single circular corner cases
243 { { 0, 0 }, { 0, 0 }, { 0, 0 }, { 15, 15 } },
244 { { 0, 0 }, { 0, 0 }, { 15, 15 }, { 0, 0 } },
245 { { 0, 0 }, { 15, 15 }, { 0, 0 }, { 0, 0 } },
246 { { 15, 15 }, { 0, 0 }, { 0, 0 }, { 0, 0 } },
241 }; 247 };
242 248
243 /////////////////////////////////////////////////////////////////////////////// 249 ///////////////////////////////////////////////////////////////////////////////
244 250
245 DEF_GM( return new RRectGM(RRectGM::kAA_Draw_Type); ) 251 DEF_GM( return new RRectGM(RRectGM::kAA_Draw_Type); )
246 DEF_GM( return new RRectGM(RRectGM::kBW_Draw_Type); ) 252 DEF_GM( return new RRectGM(RRectGM::kBW_Draw_Type); )
247 DEF_GM( return new RRectGM(RRectGM::kAA_Clip_Type); ) 253 DEF_GM( return new RRectGM(RRectGM::kAA_Clip_Type); )
248 DEF_GM( return new RRectGM(RRectGM::kBW_Clip_Type); ) 254 DEF_GM( return new RRectGM(RRectGM::kBW_Clip_Type); )
249 #if SK_SUPPORT_GPU 255 #if SK_SUPPORT_GPU
250 DEF_GM( return new RRectGM(RRectGM::kEffect_Type); ) 256 DEF_GM( return new RRectGM(RRectGM::kEffect_Type); )
251 #endif 257 #endif
252 258
253 } 259 }
OLDNEW
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | src/gpu/effects/GrRRectEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698