aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-05-08 16:02:43 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-05-09 03:52:04 +0000
commitd2da87d0b8d127da0530c661618f059eb1cc0f1e (patch)
tree6d3343057068d987acda90a419dd227601d91388
parent7f1d020bbfde245281fac88ff09b55366155be16 (diff)
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 <bsalomon@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
-rw-r--r--include/core/SkCanvas.h2
-rw-r--r--src/core/SkColorSpaceXformCanvas.cpp1
2 files changed, 2 insertions, 1 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 646ef24320..23db8d7a5b 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 2d62458b73..65297a1801 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(); }