diff options
author | robertphillips <robertphillips@google.com> | 2016-04-28 14:32:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-28 14:32:04 -0700 |
commit | 175dd9b5e3d7d749738dac743d2ac360b5340187 (patch) | |
tree | ff0ab4b2fb12c714a1723775d031220a68225d6d /src/gpu/SkGpuDevice.cpp | |
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 'src/gpu/SkGpuDevice.cpp')
-rw-r--r-- | src/gpu/SkGpuDevice.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp index 78b3cfc7d0..0e6eb92537 100644 --- a/src/gpu/SkGpuDevice.cpp +++ b/src/gpu/SkGpuDevice.cpp @@ -347,6 +347,11 @@ GrRenderTarget* SkGpuDevice::accessRenderTarget() { return fRenderTarget; } +GrDrawContext* SkGpuDevice::accessDrawContext() { + ASSERT_SINGLE_OWNER + return fDrawContext.get(); +} + void SkGpuDevice::clearAll() { ASSERT_SINGLE_OWNER GrColor color = 0; |