Move texture drawing utility method to SkGpuDevice
BUG=skia:4542
Review URL: https://codereview.chromium.org/1506203002
diff --git a/samplecode/SampleAnimatedText.cpp b/samplecode/SampleAnimatedText.cpp
index 19a8672..8ca9d87 100755
--- a/samplecode/SampleAnimatedText.cpp
+++ b/samplecode/SampleAnimatedText.cpp
@@ -106,8 +106,9 @@
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);