Flutter Engine
The Flutter Engine
Skbug5221.cpp
Go to the documentation of this file.
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
11#include "include/core/SkFont.h"
21#include "tests/Test.h"
23
24struct GrContextOptions;
25
26// This passes by not crashing.
27static void test(SkCanvas* canvas) {
28 canvas->scale(63, 0);
29 canvas->drawString("A", 50, 50, ToolUtils::DefaultFont(), SkPaint());
30}
31
32DEF_TEST(skbug5221, r) {
34 test(surface->getCanvas());
35}
36
39 contextInfo.directContext(),
42 test(surface->getCanvas());
43}
@ kPremul_SkAlphaType
pixel components are premultiplied by alpha
Definition: SkAlphaType.h:29
@ kRGBA_8888_SkColorType
pixel with 8 bits for red, green, blue, alpha; in 32-bit word
Definition: SkColorType.h:24
DEF_TEST(skbug5221, r)
Definition: Skbug5221.cpp:32
DEF_GANESH_TEST_FOR_ALL_CONTEXTS(skbug5221_GPU, r, contextInfo, CtsEnforcement::kNever)
Definition: Skbug5221.cpp:37
static void test(SkCanvas *canvas)
Definition: Skbug5221.cpp:27
void scale(SkScalar sx, SkScalar sy)
Definition: SkCanvas.cpp:1289
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
Definition: SkCanvas.h:1803
VkSurfaceKHR surface
Definition: main.cc:49
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
SK_API sk_sp< SkSurface > RenderTarget(GrRecordingContext *context, skgpu::Budgeted budgeted, const SkImageInfo &imageInfo, int sampleCount, GrSurfaceOrigin surfaceOrigin, const SkSurfaceProps *surfaceProps, bool shouldCreateWithMips=false, bool isProtected=false)
SkFont DefaultFont()
static SkImageInfo MakeN32Premul(int width, int height)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)