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
diff --git a/tests/ImageNewShaderTest.cpp b/tests/ImageNewShaderTest.cpp
index 1bc77fb..c78b715 100644
--- a/tests/ImageNewShaderTest.cpp
+++ b/tests/ImageNewShaderTest.cpp
@@ -115,8 +115,10 @@
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 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 @@
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);
}