Flutter Engine
The Flutter Engine
third_party
skia
src
image
SkImage_Picture.h
Go to the documentation of this file.
1
/*
2
* Copyright 2023 Google LLC
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
#ifndef SkImage_Picture_DEFINED
8
#define SkImage_Picture_DEFINED
9
10
#include "
include/core/SkRefCnt.h
"
11
#include "
include/core/SkTiledImageUtils.h
"
12
#include "
src/image/SkImage_Base.h
"
13
#include "
src/image/SkImage_Lazy.h
"
14
15
#include <cstdint>
16
17
class
SkCanvas
;
18
class
SkColorSpace
;
19
class
SkImage
;
20
class
SkMatrix
;
21
class
SkPaint
;
22
class
SkPicture
;
23
class
SkSurfaceProps
;
24
struct
SkISize
;
25
26
namespace
SkImages
{
enum class
BitDepth
; }
27
28
class
SkImage_Picture
:
public
SkImage_Lazy
{
29
public
:
30
static
sk_sp<SkImage>
Make
(
sk_sp<SkPicture>
picture
,
const
SkISize
&
dimensions
,
31
const
SkMatrix
*
matrix
,
const
SkPaint
*
paint
,
32
SkImages::BitDepth
bitDepth,
sk_sp<SkColorSpace>
colorSpace
,
33
SkSurfaceProps
props
);
34
35
SkImage_Picture
(
Validator
* validator) :
SkImage_Lazy
(validator) {}
36
37
SkImage_Base::Type
type
()
const override
{
return
SkImage_Base::Type::kLazyPicture
; }
38
39
// This is thread safe. It is a const field set in the constructor.
40
const
SkSurfaceProps
*
props
()
const
;
41
42
// Call drawPicture on the provided canvas taking care of any required mutex locking.
43
void
replay
(
SkCanvas
*)
const
;
44
45
// If possible, extract key data based on the underlying drawPicture-call's parameters.
46
// Takes care of any required mutex locking.
47
bool
getImageKeyValues
(uint32_t keyValues[
SkTiledImageUtils::kNumImageKeyValues
])
const
;
48
};
49
50
#endif
SkImage_Base.h
SkImage_Lazy.h
SkRefCnt.h
SkTiledImageUtils.h
SkCanvas
Definition:
SkCanvas.h:106
SkColorSpace
Definition:
SkColorSpace.h:107
SkImage_Base::Type
Type
Definition:
SkImage_Base.h:132
SkImage_Base::Type::kLazyPicture
@ kLazyPicture
SkImage_Lazy
Definition:
SkImage_Lazy.h:38
SkImage_Picture
Definition:
SkImage_Picture.h:28
SkImage_Picture::getImageKeyValues
bool getImageKeyValues(uint32_t keyValues[SkTiledImageUtils::kNumImageKeyValues]) const
Definition:
SkImage_Picture.cpp:64
SkImage_Picture::type
SkImage_Base::Type type() const override
Definition:
SkImage_Picture.h:37
SkImage_Picture::SkImage_Picture
SkImage_Picture(Validator *validator)
Definition:
SkImage_Picture.h:35
SkImage_Picture::props
const SkSurfaceProps * props() const
Definition:
SkImage_Picture.cpp:48
SkImage_Picture::replay
void replay(SkCanvas *) const
Definition:
SkImage_Picture.cpp:53
SkImage_Picture::Make
static sk_sp< SkImage > Make(sk_sp< SkPicture > picture, const SkISize &dimensions, const SkMatrix *matrix, const SkPaint *paint, SkImages::BitDepth bitDepth, sk_sp< SkColorSpace > colorSpace, SkSurfaceProps props)
Definition:
SkImage_Picture.cpp:35
SkImage
Definition:
SkImage.h:272
SkImage::colorSpace
SkColorSpace * colorSpace() const
Definition:
SkImage.cpp:156
SkImage::dimensions
SkISize dimensions() const
Definition:
SkImage.h:297
SkMatrix
Definition:
SkMatrix.h:54
SkPaint
Definition:
SkPaint.h:44
SkPicture
Definition:
SkPicture.h:44
SkSurfaceProps
Definition:
SkSurfaceProps.h:53
sk_sp< SkImage >
paint
const Paint & paint
Definition:
color_source.cc:38
SkImages
Definition:
SkImageAndroid.h:20
SkImages::BitDepth
BitDepth
Definition:
SkImage.h:125
SkRecords::matrix
unsigned useCenter Optional< SkMatrix > matrix
Definition:
SkRecords.h:258
SkRecords::picture
sk_sp< const SkPicture > picture
Definition:
SkRecords.h:299
SkTiledImageUtils::kNumImageKeyValues
static constexpr int kNumImageKeyValues
Definition:
SkTiledImageUtils.h:105
SkISize
Definition:
SkSize.h:16
SkImage_Lazy::Validator
Definition:
SkImage_Lazy.h:40
Generated on Sun Jun 23 2024 21:56:29 for Flutter Engine by
1.9.4