Flutter Engine
The Flutter Engine
SkImageEncoderPriv.h
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
8#ifndef SkImageEncoderPriv_DEFINED
9#define SkImageEncoderPriv_DEFINED
10
14
15static inline bool SkPixmapIsValid(const SkPixmap& src) {
16 if (!SkImageInfoIsValid(src.info())) {
17 return false;
18 }
19
20 if (!src.addr() || src.rowBytes() < src.info().minRowBytes()) {
21 return false;
22 }
23
24 return true;
25}
26
27#endif // SkImageEncoderPriv_DEFINED
static bool SkPixmapIsValid(const SkPixmap &src)
static bool SkImageInfoIsValid(const SkImageInfo &info)