OLD | NEW |
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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 132 |
133 void rasterToGpu(skiatest::Reporter* reporter, GrContext* context) { | 133 void rasterToGpu(skiatest::Reporter* reporter, GrContext* context) { |
134 SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5); | 134 SkImageInfo info = SkImageInfo::MakeN32Premul(5, 5); |
135 | 135 |
136 auto sourceSurface(SkSurface::MakeRaster(info)); | 136 auto sourceSurface(SkSurface::MakeRaster(info)); |
137 auto destinationSurface(SkSurface::MakeRenderTarget(context, SkBudgeted::kNo
, info)); | 137 auto destinationSurface(SkSurface::MakeRenderTarget(context, SkBudgeted::kNo
, info)); |
138 | 138 |
139 runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info)
; | 139 runShaderTest(reporter, sourceSurface.get(), destinationSurface.get(), info)
; |
140 } | 140 } |
141 | 141 |
142 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageNewShader_GPU, reporter, context) { | 142 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageNewShader_GPU, reporter, ctxInfo) { |
143 // GPU -> GPU | 143 // GPU -> GPU |
144 gpuToGpu(reporter, context); | 144 gpuToGpu(reporter, ctxInfo.fGrContext); |
145 | 145 |
146 // GPU -> RASTER | 146 // GPU -> RASTER |
147 gpuToRaster(reporter, context); | 147 gpuToRaster(reporter, ctxInfo.fGrContext); |
148 | 148 |
149 // RASTER -> GPU | 149 // RASTER -> GPU |
150 rasterToGpu(reporter, context); | 150 rasterToGpu(reporter, ctxInfo.fGrContext); |
151 } | 151 } |
152 | 152 |
153 #endif | 153 #endif |
OLD | NEW |