Flutter Engine
The Flutter Engine
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
SkSpecialImage_Ganesh.h
Go to the documentation of this file.
1/*
2 * Copyright 2019 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
8#ifndef SkSpecialImageGanesh_DEFINED
9#define SkSpecialImageGanesh_DEFINED
10
14
15#include <cstdint>
16
18class SkImage;
19class SkSpecialImage;
20class SkSurfaceProps;
21struct SkIRect;
22
23namespace SkSpecialImages {
24
26 const SkIRect& subset,
28 const SkSurfaceProps& props);
29
31 const SkIRect& subset,
32 uint32_t uniqueID,
34 const GrColorInfo&,
35 const SkSurfaceProps&);
36
37/**
38 * Regardless of how the underlying backing data is stored, returns the contents as a
39 * GrSurfaceProxyView. The returned view's proxy represents the entire backing image, so texture
40 * coordinates must be mapped from the content rect (e.g. relative to 'subset()') to the proxy's
41 * space (offset by subset().topLeft()).
42 */
45 const sk_sp<const SkSpecialImage>& img) {
46 return AsView(rContext, img.get());
47}
48
49} // namespace SkSpecialImages
50
51#endif
T * get() const
Definition: SkRefCnt.h:303
sk_sp< const SkImage > image
Definition: SkRecords.h:269
GrSurfaceProxyView AsView(GrRecordingContext *context, const SkSpecialImage *img)
sk_sp< SkSpecialImage > MakeFromTextureImage(GrRecordingContext *rContext, const SkIRect &subset, sk_sp< SkImage > image, const SkSurfaceProps &props)
sk_sp< SkSpecialImage > MakeDeferredFromGpu(GrRecordingContext *context, const SkIRect &subset, uint32_t uniqueID, GrSurfaceProxyView view, const GrColorInfo &colorInfo, const SkSurfaceProps &props)
Definition: SkRect.h:32