aboutsummaryrefslogtreecommitdiff
path: root/samplecode/SampleAnimatedText.cpp
diff options
context:
space:
mode:
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);