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

Side by Side Diff: tests/FloatingPointTextureTest.cpp

Issue 1234503004: Revert of Remove rt flags that are not necessary (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 5 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
« no previous file with comments | « no previous file | 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 24 matching lines...) Expand all
35 for (int i = 0; i < arraySize; i += 4) { 35 for (int i = 0; i < arraySize; i += 4) {
36 controlPixelData[i + 0] = min; 36 controlPixelData[i + 0] = min;
37 controlPixelData[i + 1] = max; 37 controlPixelData[i + 1] = max;
38 controlPixelData[i + 2] = epsilon; 38 controlPixelData[i + 2] = epsilon;
39 controlPixelData[i + 3] = maxInt; 39 controlPixelData[i + 3] = maxInt;
40 } 40 }
41 41
42 for (int origin = 0; origin < 2; ++origin) { 42 for (int origin = 0; origin < 2; ++origin) {
43 for (int glCtxType = 0; glCtxType < GrContextFactory::kGLContextTypeCnt; ++glCtxType) { 43 for (int glCtxType = 0; glCtxType < GrContextFactory::kGLContextTypeCnt; ++glCtxType) {
44 GrSurfaceDesc desc; 44 GrSurfaceDesc desc;
45 desc.fFlags = kRenderTarget_GrSurfaceFlag;
45 desc.fWidth = DEV_W; 46 desc.fWidth = DEV_W;
46 desc.fHeight = DEV_H; 47 desc.fHeight = DEV_H;
47 desc.fConfig = config; 48 desc.fConfig = config;
48 desc.fOrigin = 0 == origin ? 49 desc.fOrigin = 0 == origin ?
49 kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin; 50 kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin;
50 51
51 GrContextFactory::GLContextType type = 52 GrContextFactory::GLContextType type =
52 static_cast<GrContextFactory::GLContextType>(glCtxType); 53 static_cast<GrContextFactory::GLContextType>(glCtxType);
53 if (!GrContextFactory::IsRenderingGLContext(type)) { 54 if (!GrContextFactory::IsRenderingGLContext(type)) {
54 continue; 55 continue;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 92
92 static const int HALF_RGBA_CONTROL_ARRAY_SIZE = DEV_W * DEV_H * 4 /*RGBA*/; 93 static const int HALF_RGBA_CONTROL_ARRAY_SIZE = DEV_W * DEV_H * 4 /*RGBA*/;
93 94
94 DEF_GPUTEST(HalfFloatRGBATextureTest, reporter, factory) { 95 DEF_GPUTEST(HalfFloatRGBATextureTest, reporter, factory) {
95 runFPTest<SkHalf>(reporter, factory, SK_HalfMin, SK_HalfMax, SK_HalfEpsilon, 96 runFPTest<SkHalf>(reporter, factory, SK_HalfMin, SK_HalfMax, SK_HalfEpsilon,
96 kMaxIntegerRepresentableInHalfFloatingPoint, 97 kMaxIntegerRepresentableInHalfFloatingPoint,
97 HALF_RGBA_CONTROL_ARRAY_SIZE, kRGBA_half_GrPixelConfig); 98 HALF_RGBA_CONTROL_ARRAY_SIZE, kRGBA_half_GrPixelConfig);
98 } 99 }
99 100
100 #endif 101 #endif
OLDNEW
« no previous file with comments | « no previous file | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698