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

Side by Side Diff: tests/ReadWriteAlphaTest.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/ReadPixelsTest.cpp ('k') | tests/ResourceCacheTest.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
2 /* 1 /*
3 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
4 * 3 *
5 * 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
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9 // This test is specific to the GPU backend. 8 // This test is specific to the GPU backend.
10 #if SK_SUPPORT_GPU && !defined(SK_BUILD_FOR_ANDROID) 9 #if SK_SUPPORT_GPU && !defined(SK_BUILD_FOR_ANDROID)
11 10
11 #include "GrContextFactory.h"
12 #include "SkGpuDevice.h"
12 #include "Test.h" 13 #include "Test.h"
13 #include "SkGpuDevice.h" 14 #include "TestClassDef.h"
14 #include "GrContextFactory.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 static void ReadWriteAlphaTest(skiatest::Reporter* reporter, GrContextFactory* f actory) { 19 DEF_GPUTEST(ReadWriteAlpha, reporter, factory) {
20 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { 20 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
21 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type); 21 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type);
22 if (!GrContextFactory::IsRenderingGLContext(glType)) { 22 if (!GrContextFactory::IsRenderingGLContext(glType)) {
23 continue; 23 continue;
24 } 24 }
25 GrContext* context = factory->get(glType); 25 GrContext* context = factory->get(glType);
26 if (NULL == context) { 26 if (NULL == context) {
27 continue; 27 continue;
28 } 28 }
29 29
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 if (0xFF != readback[x][y]) { 103 if (0xFF != readback[x][y]) {
104 match = false; 104 match = false;
105 } 105 }
106 } 106 }
107 } 107 }
108 108
109 REPORTER_ASSERT(reporter, match); 109 REPORTER_ASSERT(reporter, match);
110 } 110 }
111 } 111 }
112 112
113 #include "TestClassDef.h"
114 DEFINE_GPUTESTCLASS("ReadWriteAlpha", ReadWriteAlphaTestClass, ReadWriteAlphaTes t)
115
116 #endif 113 #endif
OLDNEW
« no previous file with comments | « tests/ReadPixelsTest.cpp ('k') | tests/ResourceCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698