Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Namespaces | Functions
SkSurface_Raster.cpp File Reference
#include "src/image/SkSurface_Raster.h"
#include "include/core/SkBitmap.h"
#include "include/core/SkCanvas.h"
#include "include/core/SkCapabilities.h"
#include "include/core/SkImageInfo.h"
#include "include/core/SkMallocPixelRef.h"
#include "include/core/SkPixelRef.h"
#include "include/core/SkRect.h"
#include "include/core/SkRefCnt.h"
#include "include/core/SkScalar.h"
#include "include/core/SkSurface.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkMath.h"
#include "src/core/SkBitmapDevice.h"
#include "src/core/SkImageInfoPriv.h"
#include "src/core/SkImagePriv.h"
#include "src/core/SkSurfacePriv.h"
#include <cstdint>
#include <cstring>
#include <utility>

Go to the source code of this file.

Namespaces

namespace  SkSurfaces
 

Functions

bool SkSurfaceValidateRasterInfo (const SkImageInfo &info, size_t rowBytes)
 
SK_API sk_sp< SkSurfaceSkSurfaces::WrapPixels (const SkImageInfo &imageInfo, void *pixels, size_t rowBytes, PixelsReleaseProc, void *context, const SkSurfaceProps *surfaceProps=nullptr)
 
SK_API sk_sp< SkSurfaceSkSurfaces::WrapPixels (const SkImageInfo &imageInfo, void *pixels, size_t rowBytes, const SkSurfaceProps *surfaceProps=nullptr)
 
SK_API sk_sp< SkSurfaceSkSurfaces::Raster (const SkImageInfo &imageInfo, size_t rowBytes, const SkSurfaceProps *surfaceProps)
 

Function Documentation

◆ SkSurfaceValidateRasterInfo()

bool SkSurfaceValidateRasterInfo ( const SkImageInfo info,
size_t  rowBytes 
)

Definition at line 36 of file SkSurface_Raster.cpp.

36 {
38 return false;
39 }
40
41 if (kIgnoreRowBytesValue == rowBytes) {
42 return true;
43 }
44
45 if (!info.validRowBytes(rowBytes)) {
46 return false;
47 }
48
49 uint64_t size = sk_64_mul(info.height(), rowBytes);
50 static const size_t kMaxTotalSize = SK_MaxS32;
51 if (size > kMaxTotalSize) {
52 return false;
53 }
54
55 return true;
56}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
static bool SkImageInfoIsValid(const SkImageInfo &info)
static int64_t sk_64_mul(int64_t a, int64_t b)
Definition SkMath.h:33
static constexpr int32_t SK_MaxS32
Definition SkMath.h:21
constexpr size_t kIgnoreRowBytesValue
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