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

Side by Side Diff: tests/ReadWriteAlphaTest.cpp

Issue 319043005: Support using OpenGL ES context on desktop (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 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
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 // This test is specific to the GPU backend. 8 // This test is specific to the GPU backend.
9 #if SK_SUPPORT_GPU && !defined(SK_BUILD_FOR_ANDROID) 9 #if SK_SUPPORT_GPU && !defined(SK_BUILD_FOR_ANDROID)
10 10
11 #include "GrContextFactory.h" 11 #include "GrContextFactory.h"
12 #include "SkGpuDevice.h" 12 #include "SkGpuDevice.h"
13 #include "Test.h" 13 #include "Test.h"
14 14
15 static const int X_SIZE = 12; 15 static const int X_SIZE = 12;
16 static const int Y_SIZE = 12; 16 static const int Y_SIZE = 12;
17 17
18 DEF_GPUTEST(ReadWriteAlpha, reporter, factory) { 18 DEF_GPUTEST(ReadWriteAlpha, reporter, factory) {
19 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) { 19 for (int type = 0; type < GrContextFactory::kLastGLContextType; ++type) {
20 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type); 20 GrContextFactory::GLContextType glType = static_cast<GrContextFactory::G LContextType>(type);
21 if (!GrContextFactory::IsRenderingGLContext(glType)) { 21 if (!GrContextFactory::IsRenderingGLContext(glType)) {
22 continue; 22 continue;
23 } 23 }
24 GrContext* context = factory->get(glType); 24 GrContext* context = factory->get(glType, kNone_GrGLStandard);
25 if (NULL == context) { 25 if (NULL == context) {
26 continue; 26 continue;
27 } 27 }
28 28
29 unsigned char textureData[X_SIZE][Y_SIZE]; 29 unsigned char textureData[X_SIZE][Y_SIZE];
30 30
31 memset(textureData, 0, X_SIZE * Y_SIZE); 31 memset(textureData, 0, X_SIZE * Y_SIZE);
32 32
33 GrTextureDesc desc; 33 GrTextureDesc desc;
34 34
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 match = false; 103 match = false;
104 } 104 }
105 } 105 }
106 } 106 }
107 107
108 REPORTER_ASSERT(reporter, match); 108 REPORTER_ASSERT(reporter, match);
109 } 109 }
110 } 110 }
111 111
112 #endif 112 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698