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 /gm/imagefromyuvtextures.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 'gm/imagefromyuvtextures.cpp')
-rw-r--r-- | gm/imagefromyuvtextures.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gm/imagefromyuvtextures.cpp b/gm/imagefromyuvtextures.cpp index c3184be1dd..a34ec6e513 100644 --- a/gm/imagefromyuvtextures.cpp +++ b/gm/imagefromyuvtextures.cpp @@ -123,9 +123,8 @@ protected: } void onDraw(SkCanvas* canvas) override { - GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget(); - GrContext* context; - if (!rt || !(context = rt->getContext())) { + GrContext* context = canvas->getGrContext(); + if (!context) { skiagm::GM::DrawGpuOnlyMessage(canvas); return; } |