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

Side by Side Diff: tests/FloatingPointTextureTest.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/ClipCacheTest.cpp ('k') | tests/GLProgramsTest.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 2014 Google Inc. 2 * Copyright 2014 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 /* 8 /*
9 * This is a straightforward test of floating point textures, which are 9 * This is a straightforward test of floating point textures, which are
10 * supported on some platforms. As of right now, this test only supports 10 * supported on some platforms. As of right now, this test only supports
(...skipping 21 matching lines...) Expand all
32 controlPixelData[i] = FLT_MIN; 32 controlPixelData[i] = FLT_MIN;
33 controlPixelData[i + 1] = FLT_MAX; 33 controlPixelData[i + 1] = FLT_MAX;
34 controlPixelData[i + 2] = FLT_EPSILON; 34 controlPixelData[i + 2] = FLT_EPSILON;
35 controlPixelData[i + 3] = kMaxIntegerRepresentableInSPFloatingPoint; 35 controlPixelData[i + 3] = kMaxIntegerRepresentableInSPFloatingPoint;
36 } 36 }
37 37
38 for (int origin = 0; origin < 2; ++origin) { 38 for (int origin = 0; origin < 2; ++origin) {
39 int glCtxTypeCnt = 1; 39 int glCtxTypeCnt = 1;
40 glCtxTypeCnt = GrContextFactory::kGLContextTypeCnt; 40 glCtxTypeCnt = GrContextFactory::kGLContextTypeCnt;
41 for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) { 41 for (int glCtxType = 0; glCtxType < glCtxTypeCnt; ++glCtxType) {
42 GrTextureDesc desc; 42 GrSurfaceDesc desc;
43 desc.fFlags = kRenderTarget_GrTextureFlagBit; 43 desc.fFlags = kRenderTarget_GrSurfaceFlag;
44 desc.fWidth = DEV_W; 44 desc.fWidth = DEV_W;
45 desc.fHeight = DEV_H; 45 desc.fHeight = DEV_H;
46 desc.fConfig = kRGBA_float_GrPixelConfig; 46 desc.fConfig = kRGBA_float_GrPixelConfig;
47 desc.fOrigin = 0 == origin ? 47 desc.fOrigin = 0 == origin ?
48 kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin; 48 kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin;
49 49
50 GrContext* context = NULL; 50 GrContext* context = NULL;
51 GrContextFactory::GLContextType type = 51 GrContextFactory::GLContextType type =
52 static_cast<GrContextFactory::GLContextType>(glCtxType); 52 static_cast<GrContextFactory::GLContextType>(glCtxType);
53 if (!GrContextFactory::IsRenderingGLContext(type)) { 53 if (!GrContextFactory::IsRenderingGLContext(type)) {
(...skipping 17 matching lines...) Expand all
71 fpTexture->writePixels(0, 0, DEV_W, DEV_H, desc.fConfig, controlPixe lData, 0); 71 fpTexture->writePixels(0, 0, DEV_W, DEV_H, desc.fConfig, controlPixe lData, 0);
72 fpTexture->readPixels(0, 0, DEV_W, DEV_H, desc.fConfig, readBuffer, 0); 72 fpTexture->readPixels(0, 0, DEV_W, DEV_H, desc.fConfig, readBuffer, 0);
73 for (int j = 0; j < FP_CONTROL_ARRAY_SIZE; ++j) { 73 for (int j = 0; j < FP_CONTROL_ARRAY_SIZE; ++j) {
74 REPORTER_ASSERT(reporter, readBuffer[j] == controlPixelData[j]); 74 REPORTER_ASSERT(reporter, readBuffer[j] == controlPixelData[j]);
75 } 75 }
76 } 76 }
77 } 77 }
78 } 78 }
79 79
80 #endif 80 #endif
OLDNEW
« no previous file with comments | « tests/ClipCacheTest.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698