Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
14
15#include <cstdint>
16
17class SkCanvas;
18class SkColorSpace;
19class SkImage;
20class SkMatrix;
21class SkPaint;
22class SkPicture;
23class SkSurfaceProps;
24struct SkISize;
25
26namespace SkImages { enum class BitDepth; }
27
29public:
31 const SkMatrix* matrix, const SkPaint* paint,
34
35 SkImage_Picture(Validator* validator) : SkImage_Lazy(validator) {}
36
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
bool getImageKeyValues(uint32_t keyValues[SkTiledImageUtils::kNumImageKeyValues]) const
SkImage_Base::Type type() const override
SkImage_Picture(Validator *validator)
const SkSurfaceProps * props() const
void replay(SkCanvas *) const
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)
SkColorSpace * colorSpace() const
Definition SkImage.cpp:156
SkISize dimensions() const
Definition SkImage.h:297
const Paint & paint
static constexpr int kNumImageKeyValues