diff options
author | bsalomon <bsalomon@google.com> | 2015-04-30 14:18:54 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-30 14:18:54 -0700 |
commit | d309e7aa0efa2d5dd7e7b1af97026fcd3a047e98 (patch) | |
tree | 28290abc67fd60111bba896722a14dcb0611df84 /tests/FloatingPointTextureTest.cpp | |
parent | 3ffa126066542590dc7430514a1174e49191b875 (diff) |
This replaces the texture creation/caching functions on GrContext with a GrTextureProvider interface. The goal is to pass this narrowly focused object in places that currently take a GrContext but don't need and shouldn't use its other methods. It also has an extended private interface for interacting with non-texture resource types.
Review URL: https://codereview.chromium.org/1107973004
Diffstat (limited to 'tests/FloatingPointTextureTest.cpp')
-rw-r--r-- | tests/FloatingPointTextureTest.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/FloatingPointTextureTest.cpp b/tests/FloatingPointTextureTest.cpp index 7ac27cb6a4..69495b4bd2 100644 --- a/tests/FloatingPointTextureTest.cpp +++ b/tests/FloatingPointTextureTest.cpp @@ -11,9 +11,10 @@ * 32 bit floating point textures, and indeed floating point test values * have been selected to require 32 bits of precision and full IEEE conformance */ -#if SK_SUPPORT_GPU + #include <float.h> #include "Test.h" +#if SK_SUPPORT_GPU #include "GrContext.h" #include "GrTexture.h" #include "GrContextFactory.h" @@ -59,8 +60,8 @@ DEF_GPUTEST(FloatingPointTextureTest, reporter, factory) { continue; } - SkAutoTUnref<GrTexture> fpTexture(context->createTexture(desc, false, - controlPixelData.begin(), 0)); + SkAutoTUnref<GrTexture> fpTexture(context->textureProvider()->createTexture( + desc, false, controlPixelData.begin(), 0)); // Floating point textures are NOT supported everywhere if (NULL == fpTexture) { continue; @@ -106,8 +107,8 @@ DEF_GPUTEST(HalfFloatTextureTest, reporter, factory) { continue; } - SkAutoTUnref<GrTexture> fpTexture(context->createTexture(desc, false, - controlPixelData.begin(), 0)); + SkAutoTUnref<GrTexture> fpTexture(context->textureProvider()->createTexture( + desc, false, controlPixelData.begin(), 0)); // 16-bit floating point textures are NOT supported everywhere if (NULL == fpTexture) { continue; |