aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/FloatingPointTextureTest.cpp
diff options
context:
space:
mode:
authorGravatar jvanverth <jvanverth@google.com>2014-12-18 05:44:55 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2014-12-18 05:44:55 -0800
commit1334c21eee8c5b0b216895934e7a8e1c08c6f510 (patch)
tree94cf6ffa8031088dda52b3ba65aae21d327805da /tests/FloatingPointTextureTest.cpp
parenteacaa2819d04fc5807562d497215a0f6aca67d62 (diff)
One more pass at getting half float texture configs correct.
Added in check for sized internal format. Made choice between RED and ALPHA orthogonal to HALF_FLOAT and HALF_FLOAT_OES. Enabled rendertarget support on ES 2.0. Review URL: https://codereview.chromium.org/805033002
Diffstat (limited to 'tests/FloatingPointTextureTest.cpp')
-rw-r--r--tests/FloatingPointTextureTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/FloatingPointTextureTest.cpp b/tests/FloatingPointTextureTest.cpp
index 5cf1f0a449..346c737992 100644
--- a/tests/FloatingPointTextureTest.cpp
+++ b/tests/FloatingPointTextureTest.cpp
@@ -90,7 +90,7 @@ DEF_GPUTEST(HalfFloatTextureTest, reporter, factory) {
controlPixelData[i + 2] = SK_HalfEpsilon;
controlPixelData[i + 3] = 0x6800; // 2^11
}
-
+
for (int origin = 0; origin < 2; ++origin) {
int glCtxTypeCnt = 1;
glCtxTypeCnt = GrContextFactory::kGLContextTypeCnt;
@@ -102,7 +102,7 @@ DEF_GPUTEST(HalfFloatTextureTest, reporter, factory) {
desc.fConfig = kAlpha_half_GrPixelConfig;
desc.fOrigin = 0 == origin ?
kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin;
-
+
GrContext* context = NULL;
GrContextFactory::GLContextType type =
static_cast<GrContextFactory::GLContextType>(glCtxType);
@@ -113,16 +113,16 @@ DEF_GPUTEST(HalfFloatTextureTest, reporter, factory) {
if (NULL == context){
continue;
}
-
+
SkAutoTUnref<GrTexture> fpTexture(context->createUncachedTexture(desc,
NULL,
0));
-
+
// 16-bit floating point textures are NOT supported everywhere
if (NULL == fpTexture) {
continue;
}
-
+
// write square
fpTexture->writePixels(0, 0, DEV_W, DEV_H, desc.fConfig, controlPixelData, 0);
fpTexture->readPixels(0, 0, DEV_W, DEV_H, desc.fConfig, readBuffer, 0);