Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
SkSurface_Ganesh.h
Go to the documentation of this file.
1/*
2 * Copyright 2014 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 SkSurface_Ganesh_DEFINED
9#define SkSurface_Ganesh_DEFINED
10
12
19
24class SkCanvas;
25class SkCapabilities;
26class SkColorSpace;
27class SkImage;
28class SkPaint;
29class SkPixmap;
30class SkSurface;
31enum GrSurfaceOrigin : int;
32namespace skgpu {
33namespace ganesh {
34class Device;
35}
36} // namespace skgpu
37struct SkIRect;
38struct SkISize;
39
41public:
43 ~SkSurface_Ganesh() override;
44
45 // From SkSurface.h
46 SkImageInfo imageInfo() const override;
51 ReleaseContext) override;
52
53 // From SkSurface_Base.h
55
57
58 SkCanvas* onNewCanvas() override;
60 sk_sp<SkImage> onNewImageSnapshot(const SkIRect* subset) override;
61 void onWritePixels(const SkPixmap&, int x, int y) override;
63 SkIRect srcRect,
64 RescaleGamma rescaleGamma,
67 ReadPixelsContext context) override;
69 bool readAlpha,
70 sk_sp<SkColorSpace> dstColorSpace,
71 SkIRect srcRect,
72 SkISize dstSize,
73 RescaleGamma rescaleGamma,
76 ReadPixelsContext context) override;
77 bool onCopyOnWrite(ContentChangeMode) override;
78 void onDiscard() override;
79 bool onWait(int numSemaphores,
80 const GrBackendSemaphore* waitSemaphores,
81 bool deleteSemaphoresAfterWait) override;
82 bool onCharacterize(GrSurfaceCharacterization*) const override;
83 bool onIsCompatible(const GrSurfaceCharacterization&) const override;
84 void onDraw(SkCanvas* canvas,
85 SkScalar x,
86 SkScalar y,
87 const SkSamplingOptions&,
88 const SkPaint* paint) override;
89
91
95 void resolveMSAA();
97
98private:
100
101 using INHERITED = SkSurface_Base;
102};
103
104#endif // SkSurface_Ganesh_DEFINED
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213
GrSurfaceOrigin
Definition GrTypes.h:147
SkYUVColorSpace
Definition SkImageInfo.h:68
Type::kYUV Type::kRGBA() int(0.7 *637)
RescaleMode
Definition SkImage.h:587
RescaleGamma
Definition SkImage.h:585
SkCanvas * onNewCanvas() override
void onDraw(SkCanvas *canvas, SkScalar x, SkScalar y, const SkSamplingOptions &, const SkPaint *paint) override
GrBackendRenderTarget getBackendRenderTarget(BackendHandleAccess)
bool onCharacterize(GrSurfaceCharacterization *) const override
void onDiscard() override
void onAsyncRescaleAndReadPixels(const SkImageInfo &info, SkIRect srcRect, RescaleGamma rescaleGamma, RescaleMode, ReadPixelsCallback callback, ReadPixelsContext context) override
sk_sp< SkSurface > onNewSurface(const SkImageInfo &) override
SkSurface_Base::Type type() const override
bool replaceBackendTexture(const GrBackendTexture &, GrSurfaceOrigin, ContentChangeMode, TextureReleaseProc, ReleaseContext) override
GrRecordingContext * onGetRecordingContext() const override
sk_sp< SkImage > onNewImageSnapshot(const SkIRect *subset) override
~SkSurface_Ganesh() override
void onWritePixels(const SkPixmap &, int x, int y) override
GrBackendTexture getBackendTexture(BackendHandleAccess)
bool onCopyOnWrite(ContentChangeMode) override
void onAsyncRescaleAndReadPixelsYUV420(SkYUVColorSpace yuvColorSpace, bool readAlpha, sk_sp< SkColorSpace > dstColorSpace, SkIRect srcRect, SkISize dstSize, RescaleGamma rescaleGamma, RescaleMode, ReadPixelsCallback callback, ReadPixelsContext context) override
SkImageInfo imageInfo() const override
skgpu::ganesh::Device * getDevice()
bool draw(sk_sp< const GrDeferredDisplayList >)
bool onWait(int numSemaphores, const GrBackendSemaphore *waitSemaphores, bool deleteSemaphoresAfterWait) override
sk_sp< const SkCapabilities > onCapabilities() override
bool onIsCompatible(const GrSurfaceCharacterization &) const override
void(*)(ReleaseContext) TextureReleaseProc
Definition SkSurface.h:251
void * ReleaseContext
Definition SkSurface.h:249
BackendHandleAccess
Definition SkSurface.h:229
const Paint & paint
float SkScalar
Definition extension.cpp:12
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
SkImage::ReadPixelsContext ReadPixelsContext
Definition Device.cpp:81
SkImage::ReadPixelsCallback ReadPixelsCallback
Definition Device.cpp:80
double y
double x