aboutsummaryrefslogtreecommitdiffhomepage
path: root/samplecode/SampleAnimatedText.cpp
diff options
context:
space:
mode:
authorGravatar jvanverth <jvanverth@google.com>2015-12-08 18:53:44 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-08 18:53:44 -0800
commit0671b967eb02d44c8951dc4dc39df09fac15b097 (patch)
treeb03f60a7eefee024cf92361680326eac695c931d /samplecode/SampleAnimatedText.cpp
parent55462e5f50f713af731d8c07383c43ec53885d00 (diff)
Move texture drawing utility method to SkGpuDevice
Diffstat (limited to 'samplecode/SampleAnimatedText.cpp')
-rwxr-xr-xsamplecode/SampleAnimatedText.cpp5
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);