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

Unified Diff: tests/SurfaceTest.cpp

Issue 1930623003: Clean up test drawContext usage (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix typo Created 4 years, 8 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
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | tools/VisualBench/WrappedBenchmark.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/SurfaceTest.cpp
diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp
index ba66a2b3bb3f184290c2817497952e30ac0f78ca..878adeda3d957a86fe2805b429c2c8e5626c425f 100644
--- a/tests/SurfaceTest.cpp
+++ b/tests/SurfaceTest.cpp
@@ -18,6 +18,7 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
+#include "GrDrawContext.h"
#include "GrGpu.h"
#endif
@@ -413,8 +414,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(UniqueImageSnapshot_Gpu, reporter, ctxInfo) {
};
auto surfaceBackingStore = [reporter](SkSurface* surface) {
- GrRenderTarget* rt =
- surface->getCanvas()->internal_private_accessTopLayerRenderTarget();
+ GrDrawContext* dc = surface->getCanvas()->internal_private_accessTopLayerDrawContext();
+ GrRenderTarget* rt = dc->accessRenderTarget();
if (!rt) {
ERRORF(reporter, "Not render target backed.");
return static_cast<intptr_t>(0);
@@ -861,7 +862,9 @@ void test_surface_clear(skiatest::Reporter* reporter, sk_sp<SkSurface> surface,
DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SurfaceClear_Gpu, reporter, ctxInfo) {
GrContext* context = ctxInfo.fGrContext;
std::function<GrSurface*(SkSurface*)> grSurfaceGetters[] = {
- [] (SkSurface* s){ return s->getCanvas()->internal_private_accessTopLayerRenderTarget(); },
+ [] (SkSurface* s){
+ GrDrawContext* dc = s->getCanvas()->internal_private_accessTopLayerDrawContext();
+ return dc->accessRenderTarget(); },
[] (SkSurface* s){
SkBaseDevice* d =
s->getCanvas()->getDevice_just_for_deprecated_compatibility_testing();
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | tools/VisualBench/WrappedBenchmark.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698