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

Side by Side Diff: tests/ImageNewShaderTest.cpp

Issue 1728093005: Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add aliases for Chrome Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « tests/ImageIsOpaqueTest.cpp ('k') | tests/ImageTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkCanvas.h" 8 #include "SkCanvas.h"
9 #include "SkImage.h" 9 #include "SkImage.h"
10 #include "SkShader.h" 10 #include "SkShader.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info) ; 110 runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info) ;
111 } 111 }
112 112
113 #if SK_SUPPORT_GPU 113 #if SK_SUPPORT_GPU
114 114
115 void gpuToGpu(skiatest::Reporter* reporter, GrContext* context) { 115 void gpuToGpu(skiatest::Reporter* reporter, GrContext* context) {
116 SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5); 116 SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5);
117 117
118 SkAutoTUnref<SkSurface> sourceSurface( 118 SkAutoTUnref<SkSurface> sourceSurface(
119 SkSurface::NewRenderTarget(context, SkSurface::kNo_Budgeted, info)); 119 SkSurface::NewRenderTarget(context, SkBudgeted::kNo, info));
120 SkAutoTUnref<SkSurface> destinationSurface( 120 SkAutoTUnref<SkSurface> destinationSurface(
121 SkSurface::NewRenderTarget(context, SkSurface::kNo_Budgeted, info)); 121 SkSurface::NewRenderTarget(context, SkBudgeted::kNo, info));
122 122
123 runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info) ; 123 runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info) ;
124 } 124 }
125 125
126 void gpuToRaster(skiatest::Reporter* reporter, GrContext* context) { 126 void gpuToRaster(skiatest::Reporter* reporter, GrContext* context) {
127 SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5); 127 SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5);
128 128
129 SkAutoTUnref<SkSurface> sourceSurface(SkSurface::NewRenderTarget(context, 129 SkAutoTUnref<SkSurface> sourceSurface(SkSurface::NewRenderTarget(context,
130 SkSurface::kNo_Budgeted, info)); 130 SkBudgeted::kNo, info));
131 SkAutoTUnref<SkSurface> destinationSurface(SkSurface::NewRaster(info)); 131 SkAutoTUnref<SkSurface> destinationSurface(SkSurface::NewRaster(info));
132 132
133 runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info) ; 133 runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info) ;
134 } 134 }
135 135
136 void rasterToGpu(skiatest::Reporter* reporter, GrContext* context) { 136 void rasterToGpu(skiatest::Reporter* reporter, GrContext* context) {
137 SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5); 137 SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5);
138 138
139 SkAutoTUnref<SkSurface> sourceSurface(SkSurface::NewRaster(info)); 139 SkAutoTUnref<SkSurface> sourceSurface(SkSurface::NewRaster(info));
140 SkAutoTUnref<SkSurface> destinationSurface(SkSurface::NewRenderTarget(contex t, 140 SkAutoTUnref<SkSurface> destinationSurface(SkSurface::NewRenderTarget(contex t,
141 SkSurface::kNo_Budgeted, info)); 141 SkBudgeted::kNo, info));
142 142
143 runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info) ; 143 runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info) ;
144 } 144 }
145 145
146 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageNewShader_GPU, reporter, context) { 146 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageNewShader_GPU, reporter, context) {
147 // GPU -> GPU 147 // GPU -> GPU
148 gpuToGpu(reporter, context); 148 gpuToGpu(reporter, context);
149 149
150 // GPU -> RASTER 150 // GPU -> RASTER
151 gpuToRaster(reporter, context); 151 gpuToRaster(reporter, context);
152 152
153 // RASTER -> GPU 153 // RASTER -> GPU
154 rasterToGpu(reporter, context); 154 rasterToGpu(reporter, context);
155 } 155 }
156 156
157 #endif 157 #endif
OLDNEW
« no previous file with comments | « tests/ImageIsOpaqueTest.cpp ('k') | tests/ImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698