From d2da87d0b8d127da0530c661618f059eb1cc0f1e Mon Sep 17 00:00:00 2001 From: Brian Osman Date: Mon, 8 May 2017 16:02:43 -0400 Subject: [PATCH] Forward getGrContext in color space xform canvas Bug: chromium:719664 Change-Id: I7477c1eb0479d5305233dc6a643280d88029bd17 Reviewed-on: https://skia-review.googlesource.com/15888 Reviewed-by: Brian Salomon Commit-Queue: Brian Osman --- include/core/SkCanvas.h | 2 +- src/core/SkColorSpaceXformCanvas.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 646ef24..23db8d7 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -176,7 +176,7 @@ public: * Return the GPU context of the device that is associated with the canvas. * For a canvas with non-GPU device, NULL is returned. */ - GrContext* getGrContext(); + virtual GrContext* getGrContext(); /////////////////////////////////////////////////////////////////////////// diff --git a/src/core/SkColorSpaceXformCanvas.cpp b/src/core/SkColorSpaceXformCanvas.cpp index 2d62458..65297a1 100644 --- a/src/core/SkColorSpaceXformCanvas.cpp +++ b/src/core/SkColorSpaceXformCanvas.cpp @@ -298,6 +298,7 @@ public: return false; } + GrContext* getGrContext() override { return fTarget->getGrContext(); } bool onGetProps(SkSurfaceProps* props) const override { return fTarget->getProps(props); } void onFlush() override { return fTarget->flush(); } -- 2.7.4