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

Side by Side Diff: tests/ReadWriteAlphaTest.cpp

Issue 682223002: rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: const Created 6 years, 1 month 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 | « 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 /* 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
(...skipping 12 matching lines...) Expand all
23 } 23 }
24 GrContext* context = factory->get(glType); 24 GrContext* context = factory->get(glType);
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 GrSurfaceDesc desc;
34 34
35 // let Skia know we will be using this texture as a render target 35 // let Skia know we will be using this texture as a render target
36 desc.fFlags = kRenderTarget_GrTextureFlagBit; 36 desc.fFlags = kRenderTarget_GrSurfaceFlag;
37 // it is a single channel texture 37 // it is a single channel texture
38 desc.fConfig = kAlpha_8_GrPixelConfig; 38 desc.fConfig = kAlpha_8_GrPixelConfig;
39 desc.fWidth = X_SIZE; 39 desc.fWidth = X_SIZE;
40 desc.fHeight = Y_SIZE; 40 desc.fHeight = Y_SIZE;
41 41
42 // We are initializing the texture with zeros here 42 // We are initializing the texture with zeros here
43 GrTexture* texture = context->createUncachedTexture(desc, textureData, 0 ); 43 GrTexture* texture = context->createUncachedTexture(desc, textureData, 0 );
44 if (!texture) { 44 if (!texture) {
45 return; 45 return;
46 } 46 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 #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