diff options
author | bsalomon <bsalomon@google.com> | 2015-01-16 07:32:33 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-16 07:32:33 -0800 |
commit | afe3005be3392e43bc51eb7eb2017eefaed85ad1 (patch) | |
tree | 3b96ec2e3249a928a0e876140bec3bf3e9dbb13f /tests/ImageNewShaderTest.cpp | |
parent | b50ced703030dfbda4fc3ef5e6ec9a52fc0405f8 (diff) |
Require budget decision when creating a RenderTarget SkSurface.
Restructure SkGpuDevice creation:
*SkSurfaceProps are optional.
*Use SkSurfaceProps to communicate DF text rather than a flag.
*Tell SkGpuDevice::Create whether RT comes from cache or not.
Review URL: https://codereview.chromium.org/848903004
Diffstat (limited to 'tests/ImageNewShaderTest.cpp')
-rw-r--r-- | tests/ImageNewShaderTest.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/ImageNewShaderTest.cpp b/tests/ImageNewShaderTest.cpp index 1bc77fba66..c78b7157a2 100644 --- a/tests/ImageNewShaderTest.cpp +++ b/tests/ImageNewShaderTest.cpp @@ -115,8 +115,10 @@ DEF_TEST(ImageNewShader, reporter) { void gpuToGpu(skiatest::Reporter* reporter, GrContext* context) { SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5); - SkAutoTUnref<SkSurface> sourceSurface(SkSurface::NewRenderTarget(context, info)); - SkAutoTUnref<SkSurface> destinationSurface(SkSurface::NewRenderTarget(context, info)); + SkAutoTUnref<SkSurface> sourceSurface( + SkSurface::NewRenderTarget(context, SkSurface::kNo_Budgeted, info)); + SkAutoTUnref<SkSurface> destinationSurface( + SkSurface::NewRenderTarget(context, SkSurface::kNo_Budgeted, info)); runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info); } @@ -124,7 +126,8 @@ void gpuToGpu(skiatest::Reporter* reporter, GrContext* context) { void gpuToRaster(skiatest::Reporter* reporter, GrContext* context) { SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5); - SkAutoTUnref<SkSurface> sourceSurface(SkSurface::NewRenderTarget(context, info)); + SkAutoTUnref<SkSurface> sourceSurface(SkSurface::NewRenderTarget(context, + SkSurface::kNo_Budgeted, info)); SkAutoTUnref<SkSurface> destinationSurface(SkSurface::NewRaster(info)); runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info); @@ -134,7 +137,8 @@ void rasterToGpu(skiatest::Reporter* reporter, GrContext* context) { SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5); SkAutoTUnref<SkSurface> sourceSurface(SkSurface::NewRaster(info)); - SkAutoTUnref<SkSurface> destinationSurface(SkSurface::NewRenderTarget(context, info)); + SkAutoTUnref<SkSurface> destinationSurface(SkSurface::NewRenderTarget(context, + SkSurface::kNo_Budgeted, info)); runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info); } |