Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
Skbug5221.cpp File Reference
#include "include/core/SkAlphaType.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkColorType.h"
#include "include/core/SkFont.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkPaint.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkSurface.h"
#include "include/core/SkTypes.h"
#include "include/gpu/GpuTypes.h"
#include "include/gpu/GrDirectContext.h"
#include "include/gpu/ganesh/SkSurfaceGanesh.h"
#include "tests/CtsEnforcement.h"
#include "tests/Test.h"
#include "tools/fonts/FontToolUtils.h"

Go to the source code of this file.

Functions

static void test (SkCanvas *canvas)
 
 DEF_TEST (skbug5221, r)
 
 DEF_GANESH_TEST_FOR_ALL_CONTEXTS (skbug5221_GPU, r, contextInfo, CtsEnforcement::kNever)
 

Function Documentation

◆ DEF_GANESH_TEST_FOR_ALL_CONTEXTS()

DEF_GANESH_TEST_FOR_ALL_CONTEXTS ( skbug5221_GPU  ,
,
contextInfo  ,
CtsEnforcement::kNever   
)

Definition at line 37 of file Skbug5221.cpp.

37 {
39 contextInfo.directContext(),
42 test(surface->getCanvas());
43}
#define test(name)
@ 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
VkSurfaceKHR surface
Definition main.cc:49
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)
static SkImageInfo Make(int width, int height, SkColorType ct, SkAlphaType at)

◆ DEF_TEST()

DEF_TEST ( skbug5221  ,
 
)

Definition at line 32 of file Skbug5221.cpp.

32 {
34 test(surface->getCanvas());
35}
SK_API sk_sp< SkSurface > Raster(const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
static SkImageInfo MakeN32Premul(int width, int height)

◆ test()

static void test ( SkCanvas canvas)
static

Definition at line 27 of file Skbug5221.cpp.

27 {
28 canvas->scale(63, 0);
29 canvas->drawString("A", 50, 50, ToolUtils::DefaultFont(), SkPaint());
30}
void scale(SkScalar sx, SkScalar sy)
void drawString(const char str[], SkScalar x, SkScalar y, const SkFont &font, const SkPaint &paint)
Definition SkCanvas.h:1803
SkFont DefaultFont()