Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: tests/ImageNewShaderTest.cpp

Issue 848903004: Require budget decision when creating a RenderTarget SkSurface (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make compatible with chrome Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/ImageNewShaderTest.cpp
diff --git a/tests/ImageNewShaderTest.cpp b/tests/ImageNewShaderTest.cpp
index 1bc77fba66ad9c7a0b864f724486158014dd720b..d6ade9713ad3d4b2278a73ab9d265313a8613e31 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,
robertphillips 2015/01/15 21:30:36 tab over ?
bsalomon 2015/01/15 22:15:50 Done.
+ SkSurface::kNo_Budgeted, info));
+ SkAutoTUnref<SkSurface> destinationSurface(SkSurface::NewRenderTarget(context,
+ SkSurface::kNo_Budgeted, info));
runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info);
}
@@ -124,8 +126,10 @@ 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> destinationSurface(SkSurface::NewRaster(info));
+ SkAutoTUnref<SkSurface> sourceSurface(SkSurface::NewRenderTarget(context,
+ SkSurface::kNo_Budgeted, info));
robertphillips 2015/01/15 21:30:36 Shouldn't this remain NewRaster ?
bsalomon 2015/01/15 22:15:50 Yup, I got overzealous.
+ SkAutoTUnref<SkSurface> destinationSurface(SkSurface::NewRenderTarget(context,
+ SkSurface::kNo_Budgeted, info));
runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info);
}
@@ -134,7 +138,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);
}

Powered by Google App Engine
This is Rietveld 408576698