Flutter Engine
The Flutter Engine
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
RescaleMode
Definition: SkImage.h:587
RescaleGamma
Definition: SkImage.h:585
SkSurface_Base(int width, int height, const SkSurfaceProps *)
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
SkSurface_Ganesh(sk_sp< skgpu::ganesh::Device >)
bool onIsCompatible(const GrSurfaceCharacterization &) const override
ContentChangeMode
Definition: SkSurface.h:203
void(*)(ReleaseContext) TextureReleaseProc
Definition: SkSurface.h:251
void * ReleaseContext
Definition: SkSurface.h:249
BackendHandleAccess
Definition: SkSurface.h:229
const Paint & paint
Definition: color_source.cc:38
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
Definition: GpuTools.h:21
Definition: SkRect.h:32
Definition: SkSize.h:16