Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2016 Google Inc. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license that can be | |
| 5 * found in the LICENSE file. | |
| 6 */ | |
| 7 | |
| 8 #include "Test.h" | |
| 9 #include "SkCanvas.h" | |
|
robertphillips
2016/05/02 19:53:12
Can we rm SkPath.h now ?
bsalomon
2016/05/02 19:57:54
indeed
| |
| 10 #include "SkPath.h" | |
| 11 #include "SkSurface.h" | |
| 12 | |
| 13 // This passes by not crashing. | |
| 14 static void test(SkCanvas* canvas) { | |
| 15 SkPaint paint; | |
| 16 paint.setAntiAlias(true); | |
| 17 canvas->scale(63, 0); | |
| 18 static const char kTxt[] = "A"; | |
| 19 canvas->drawText(kTxt, SK_ARRAY_COUNT(kTxt), 50, 50, paint); | |
| 20 } | |
| 21 | |
| 22 DEF_TEST(skbug5221, r) { | |
| 23 sk_sp<SkSurface> surface(SkSurface::MakeRaster(SkImageInfo::MakeN32Premul(25 6, 256))); | |
| 24 test(surface->getCanvas()); | |
| 25 } | |
| 26 | |
| 27 #if SK_SUPPORT_GPU | |
| 28 DEF_GPUTEST_FOR_ALL_CONTEXTS(skbug5221_GPU, r, contextInfo) { | |
| 29 sk_sp<SkSurface> surface(SkSurface::MakeRenderTarget(contextInfo.fGrContext, SkBudgeted::kYes, | |
| 30 SkImageInfo::MakeN32Pre mul(256, 256), 0, | |
| 31 nullptr)); | |
| 32 test(surface->getCanvas()); | |
| 33 } | |
| 34 #endif | |
| OLD | NEW |