diff options
author | Robert Phillips <robertphillips@google.com> | 2016-12-20 08:57:26 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-20 14:39:45 +0000 |
commit | 22f4a1fd4859aa75133de37a24b3201cce5d6844 (patch) | |
tree | 526e4c78647cb3596fab756c8442c454f67a6826 /samplecode/SampleAnimatedText.cpp | |
parent | 1bfcf887553a9d39b25f0d8c408b78841cd9d8fc (diff) |
Remove getDevice_just_for_deprecated_compatibility_test()
BUG=skia:6067
Change-Id: I646e75f43bc77ea884b7fad7281bf0b684996bb9
Reviewed-on: https://skia-review.googlesource.com/6299
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'samplecode/SampleAnimatedText.cpp')
-rw-r--r-- | samplecode/SampleAnimatedText.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/samplecode/SampleAnimatedText.cpp b/samplecode/SampleAnimatedText.cpp index dec8f8f49d..cc672ff18b 100644 --- a/samplecode/SampleAnimatedText.cpp +++ b/samplecode/SampleAnimatedText.cpp @@ -19,7 +19,6 @@ #if SK_SUPPORT_GPU #include "GrContext.h" -#include "SkGpuDevice.h" #endif SkRandom gRand; @@ -102,12 +101,11 @@ protected: canvas->save(); #if SK_SUPPORT_GPU - SkBaseDevice* device = canvas->getDevice_just_for_deprecated_compatibility_testing(); GrContext* grContext = canvas->getGrContext(); if (grContext) { - GrTexture* tex = grContext->getFontAtlasTexture(GrMaskFormat::kA8_GrMaskFormat); - reinterpret_cast<SkGpuDevice*>(device)->drawTexture(tex, - SkRect::MakeXYWH(512, 10, 512, 512), paint); + sk_sp<SkImage> image = grContext->getFontAtlasImage(GrMaskFormat::kA8_GrMaskFormat); + canvas->drawImageRect(image, + SkRect::MakeXYWH(512.0f, 10.0f, 512.0f, 512.0f), &paint); } #endif canvas->translate(180, 180); |