diff options
author | jvanverth <jvanverth@google.com> | 2015-12-08 18:53:44 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-12-08 18:53:44 -0800 |
commit | 0671b967eb02d44c8951dc4dc39df09fac15b097 (patch) | |
tree | b03f60a7eefee024cf92361680326eac695c931d /samplecode/SampleAnimatedText.cpp | |
parent | 55462e5f50f713af731d8c07383c43ec53885d00 (diff) |
Move texture drawing utility method to SkGpuDevice
BUG=skia:4542
Review URL: https://codereview.chromium.org/1506203002
Diffstat (limited to 'samplecode/SampleAnimatedText.cpp')
-rwxr-xr-x | samplecode/SampleAnimatedText.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/samplecode/SampleAnimatedText.cpp b/samplecode/SampleAnimatedText.cpp index 19a8672abb..8ca9d87526 100755 --- a/samplecode/SampleAnimatedText.cpp +++ b/samplecode/SampleAnimatedText.cpp @@ -106,8 +106,9 @@ protected: SkBaseDevice* device = canvas->getDevice_just_for_deprecated_compatibility_testing(); GrContext* grContext = canvas->getGrContext(); if (grContext) { - grContext->drawFontCache(SkRect::MakeXYWH(512, 10, 512, 512), kA8_GrMaskFormat, paint, - reinterpret_cast<SkGpuDevice*>(device)->accessRenderTarget()); + GrTexture* tex = grContext->getFontAtlasTexture(GrMaskFormat::kA8_GrMaskFormat); + reinterpret_cast<SkGpuDevice*>(device)->drawTexture(tex, + SkRect::MakeXYWH(512, 10, 512, 512), paint); } #endif canvas->translate(180, 180); |