| * Copyright 2016 Google Inc. |
| * Use of this source code is governed by a BSD-style license that can be |
| * found in the LICENSE file. |
| // This passes by not crashing. |
| static void test(SkCanvas* canvas) { |
| paint.setAntiAlias(true); |
| static const char kTxt[] = "A"; |
| canvas->drawText(kTxt, SK_ARRAY_COUNT(kTxt), 50, 50, paint); |
| sk_sp<SkSurface> surface(SkSurface::MakeRaster(SkImageInfo::MakeN32Premul(256, 256))); |
| test(surface->getCanvas()); |
| DEF_GPUTEST_FOR_ALL_CONTEXTS(skbug5221_GPU, r, contextInfo) { |
| sk_sp<SkSurface> surface(SkSurface::MakeRenderTarget( |
| contextInfo.grContext(), SkBudgeted::kYes, |
| SkImageInfo::Make(256, 256, kRGBA_8888_SkColorType, kPremul_SkAlphaType))); |
| test(surface->getCanvas()); |