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

Side by Side Diff: tests/ClipCacheTest.cpp

Issue 132293005: Add a DEF_GPUTEST() macro. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fatory -> factory Created 6 years, 11 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 | « tests/BlurTest.cpp ('k') | tests/DeferredCanvasTest.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
9 #include "Test.h" 8 #include "Test.h"
9 #include "TestClassDef.h"
10 // This is a GR test 10 // This is a GR test
11 #if SK_SUPPORT_GPU 11 #if SK_SUPPORT_GPU
12 #include "GrContextFactory.h" 12 #include "GrContextFactory.h"
13 #include "SkGpuDevice.h" 13 #include "SkGpuDevice.h"
14 #include "../../src/gpu/GrClipMaskManager.h" 14 #include "../../src/gpu/GrClipMaskManager.h"
15 15
16 static const int X_SIZE = 12; 16 static const int X_SIZE = 12;
17 static const int Y_SIZE = 12; 17 static const int Y_SIZE = 12;
18 18
19 //////////////////////////////////////////////////////////////////////////////// 19 ////////////////////////////////////////////////////////////////////////////////
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 // pop again - so there is no state 213 // pop again - so there is no state
214 cache.pop(); 214 cache.pop();
215 215
216 #if !defined(SK_DEBUG) 216 #if !defined(SK_DEBUG)
217 // verify that the getters don't crash 217 // verify that the getters don't crash
218 // only do in release since it generates asserts in debug 218 // only do in release since it generates asserts in debug
219 check_empty_state(reporter, cache); 219 check_empty_state(reporter, cache);
220 #endif 220 #endif
221 } 221 }
222 222
223 //////////////////////////////////////////////////////////////////////////////// 223 DEF_GPUTEST(ClipCache, reporter, factory) {
224 static void TestClipCache(skiatest::Reporter* reporter, GrContextFactory* factor y) {
225 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { 224 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
226 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type); 225 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type);
227 if (!GrContextFactory::IsRenderingGLContext(glType)) { 226 if (!GrContextFactory::IsRenderingGLContext(glType)) {
228 continue; 227 continue;
229 } 228 }
230 GrContext* context = factory->get(glType); 229 GrContext* context = factory->get(glType);
231 if (NULL == context) { 230 if (NULL == context) {
232 continue; 231 continue;
233 } 232 }
234 233
235 test_cache(reporter, context); 234 test_cache(reporter, context);
236 test_clip_bounds(reporter, context); 235 test_clip_bounds(reporter, context);
237 } 236 }
238 } 237 }
239 238
240 ////////////////////////////////////////////////////////////////////////////////
241 #include "TestClassDef.h"
242 DEFINE_GPUTESTCLASS("ClipCache", ClipCacheTestClass, TestClipCache)
243
244 #endif 239 #endif
OLDNEW
« no previous file with comments | « tests/BlurTest.cpp ('k') | tests/DeferredCanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698