aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/RectangleTextureTest.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-08-03 14:26:53 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-03 14:26:53 -0700
commit4fd74aec9f6c68c66483bcc6735793440b1ba184 (patch)
tree2dc927157414e8393d1e31dff5c3fbcd873a883d /tests/RectangleTextureTest.cpp
parent4db3b7969f62f5ddbf32bd812b9510af018ece89 (diff)
Move GrContext::makeDrawContext to new GrContextPriv object
We don't want external clients to be able to call the wrapping makeDrawContext. The "creating" makeDrawContext needs to be public for external image filters. The 3 specialized drawContext creators on GrContextPriv (to wrap backend objects) are also to be kept from public use and will be used to remove SkSurface::MakeRenderTargetDirect. Split out of: https://codereview.chromium.org/2176333002/ (Remove SkSurface::MakeRenderTargetDirect) TBR=bsalomon@google.com GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2211473002 Review-Url: https://codereview.chromium.org/2211473002
Diffstat (limited to 'tests/RectangleTextureTest.cpp')
-rw-r--r--tests/RectangleTextureTest.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/RectangleTextureTest.cpp b/tests/RectangleTextureTest.cpp
index 2dbb888425..a21b5a2f63 100644
--- a/tests/RectangleTextureTest.cpp
+++ b/tests/RectangleTextureTest.cpp
@@ -8,6 +8,7 @@
#include "Test.h"
#if SK_SUPPORT_GPU
#include "GrContext.h"
+#include "GrContextPriv.h"
#include "GrDrawContext.h"
#include "gl/GrGLGpu.h"
#include "gl/GrGLUtil.h"
@@ -89,9 +90,9 @@ static void test_copy_surface_dst(skiatest::Reporter* reporter, GrContext* conte
static void test_clear(skiatest::Reporter* reporter, GrContext* context,
GrTexture* rectangleTexture) {
if (rectangleTexture->asRenderTarget()) {
- sk_sp<GrDrawContext> dc(
- context->makeDrawContext(sk_ref_sp(rectangleTexture->asRenderTarget()),
- nullptr));
+ sk_sp<GrDrawContext> dc(context->contextPriv().makeWrappedDrawContext(
+ sk_ref_sp(rectangleTexture->asRenderTarget()),
+ nullptr));
if (!dc) {
ERRORF(reporter, "Could not get GrDrawContext for rectangle texture.");
return;