Flutter Engine
The Flutter Engine
Functions
Surface_MakeRasterDirect.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (Surface_MakeRasterDirect, 256, 256, true, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Surface_MakeRasterDirect  ,
256  ,
256  ,
true  ,
 
)

Definition at line 4 of file Surface_MakeRasterDirect.cpp.

4 {
5void draw(SkCanvas*) {
7 const size_t size = info.computeMinByteSize();
8 SkPMColor* pixels = new SkPMColor[size];
10 SkCanvas* canvas = surface->getCanvas();
11 canvas->clear(SK_ColorWHITE);
12 SkPMColor pmWhite = pixels[0];
14 canvas->drawPoint(1, 1, paint);
15 for (int y = 0; y < info.height(); ++y) {
16 for (int x = 0; x < info.width(); ++x) {
17 SkDebugf("%c", *pixels++ == pmWhite ? '-' : 'x');
18 }
19 SkDebugf("\n");
20 }
21 delete[] pixels;
22}
23} // END FIDDLE
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
uint32_t SkPMColor
Definition: SkColor.h:205
constexpr SkColor SK_ColorWHITE
Definition: SkColor.h:122
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawPoint(SkScalar x, SkScalar y, const SkPaint &paint)
Definition: SkCanvas.cpp:2695
void clear(SkColor color)
Definition: SkCanvas.h:1199
const Paint & paint
Definition: color_source.cc:38
VkSurfaceKHR surface
Definition: main.cc:49
double y
double x
SK_API sk_sp< SkSurface > WrapPixels(const SkImageInfo &imageInfo, void *pixels, size_t rowBytes, const SkSurfaceProps *surfaceProps=nullptr)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
static SkImageInfo MakeN32Premul(int width, int height)