xref: /aosp_15_r20/external/skia/src/gpu/ganesh/image/SkImage_LazyTexture.h (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
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_LazyTexture_DEFINED
8 #define SkImage_LazyTexture_DEFINED
9 
10 #include "include/core/SkRefCnt.h"
11 #include "include/core/SkTypes.h"
12 #include "src/image/SkImage_Lazy.h"
13 
14 class GrDirectContext;
15 class SkImage;
16 class SkPixmap;
17 struct SkIRect;
18 
19 class SkImage_LazyTexture final : public SkImage_Lazy {
20 public:
SkImage_LazyTexture(SkImage_Lazy::Validator * validator)21     SkImage_LazyTexture(SkImage_Lazy::Validator *validator) : SkImage_Lazy(validator) {}
22 
23     bool readPixelsProxy(GrDirectContext*, const SkPixmap&) const override;
24 
25     sk_sp<SkImage> onMakeSubset(GrDirectContext*, const SkIRect&) const override;
26 };
27 
28 #endif
29