Flutter Engine
The Flutter Engine
Region_readFromMemory.cpp
Go to the documentation of this file.
1// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4REG_FIDDLE(Region_readFromMemory, 256, 100, false, 0) {
5void draw(SkCanvas* canvas) {
6 SkRegion region({20, 20, 80, 80});
7 size_t size = region.writeToMemory(nullptr);
9 region.writeToMemory(data->writable_data());
11 copy.readFromMemory(data->data(), data->size());
12 canvas->drawRegion(copy, SkPaint());
13}
14} // END FIDDLE
REG_FIDDLE(Region_readFromMemory, 256, 100, false, 0)
static void copy(void *dst, const uint8_t *src, int width, int bpp, int deltaSrc, int offset, const SkPMColor ctable[])
Definition: SkSwizzler.cpp:31
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawRegion(const SkRegion &region, const SkPaint &paint)
Definition: SkCanvas.cpp:1685
static sk_sp< SkData > MakeUninitialized(size_t length)
Definition: SkData.cpp:116
size_t writeToMemory(void *buffer) const
Definition: SkRegion.cpp:1149
ClipOpAndAA opAA SkRegion region
Definition: SkRecords.h:238
Definition: copy.py:1
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
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63