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/RecordReplaceDrawTest.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/RecordReplaceDrawTest.cpp')
-rw-r--r-- | tests/RecordReplaceDrawTest.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/RecordReplaceDrawTest.cpp b/tests/RecordReplaceDrawTest.cpp index 41da9a1b5c..473683bc56 100644 --- a/tests/RecordReplaceDrawTest.cpp +++ b/tests/RecordReplaceDrawTest.cpp @@ -5,10 +5,10 @@ * found in the LICENSE file. */ -#if SK_SUPPORT_GPU - #include "Test.h" +#if SK_SUPPORT_GPU + #include "GrContextFactory.h" #include "GrLayerCache.h" #include "GrRecordReplaceDraw.h" @@ -124,7 +124,8 @@ void test_replacements(skiatest::Reporter* r, GrContext* context, bool useBBH) { desc.fHeight = kHeight; desc.fSampleCnt = 0; - SkAutoTUnref<GrTexture> texture(context->createTexture(desc, false, NULL, 0)); + SkAutoTUnref<GrTexture> texture(context->textureProvider()->createTexture(desc, + false, NULL, 0)); layer->setTexture(texture, SkIRect::MakeWH(kWidth, kHeight)); SkAutoTUnref<SkBBoxHierarchy> bbh; |