diff options
author | 2016-04-28 14:32:04 -0700 | |
---|---|---|
committer | 2016-04-28 14:32:04 -0700 | |
commit | 175dd9b5e3d7d749738dac743d2ac360b5340187 (patch) | |
tree | ff0ab4b2fb12c714a1723775d031220a68225d6d /include/core | |
parent | 801b44c45348144a483793e7b24f4d4092a4f74d (diff) |
Clean up test drawContext usage
The general idea is to provide access to SkGpuDevice's drawContext rather than its GrRenderTarget. That is usually what the testing framework actually wants.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1930623003
Review-Url: https://codereview.chromium.org/1930623003
Diffstat (limited to 'include/core')
-rw-r--r-- | include/core/SkCanvas.h | 4 | ||||
-rw-r--r-- | include/core/SkDevice.h | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h index 4853d35cef..b6d0cc704a 100644 --- a/include/core/SkCanvas.h +++ b/include/core/SkCanvas.h @@ -19,7 +19,7 @@ #include "SkXfermode.h" class GrContext; -class GrRenderTarget; +class GrDrawContext; class SkBaseDevice; class SkCanvasClipVisitor; class SkClipStack; @@ -1222,7 +1222,7 @@ public: /////////////////////////////////////////////////////////////////////////// // don't call - GrRenderTarget* internal_private_accessTopLayerRenderTarget(); + GrDrawContext* internal_private_accessTopLayerDrawContext(); // don't call static void Internal_Private_SetIgnoreSaveLayerBounds(bool); diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h index 73c35c3341..e06650036d 100644 --- a/include/core/SkDevice.h +++ b/include/core/SkDevice.h @@ -106,8 +106,12 @@ public: /** * Return the device's associated gpu render target, or NULL. */ - virtual GrRenderTarget* accessRenderTarget() { return NULL; } + virtual GrRenderTarget* accessRenderTarget() { return nullptr; } + /** + * Don't call this! + */ + virtual GrDrawContext* accessDrawContext() { return nullptr; } /** * Return the device's origin: its offset in device coordinates from |