blob: 8ace1475fbeeb9a512d5677500c744a94e5d7974 [file] [log] [blame]
* Copyright 2021 Google LLC
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
#ifndef skgpu_Surface_Graphite_DEFINED
#define skgpu_Surface_Graphite_DEFINED
#include "src/image/SkSurface_Base.h"
namespace skgpu {
class Context;
class Device;
class Recorder;
class Surface_Graphite final : public SkSurface_Base {
~Surface_Graphite() override;
SkCanvas* onNewCanvas() override;
sk_sp<SkSurface> onNewSurface(const SkImageInfo&) override;
sk_sp<SkImage> onNewImageSnapshot(const SkIRect* subset) override;
void onWritePixels(const SkPixmap&, int x, int y) override;
bool onCopyOnWrite(ContentChangeMode) override;
bool onReadPixels(Context*, Recorder*, const SkPixmap& dst, int srcX, int srcY);
sk_sp<Device> fDevice;
} // namespace skgpu
#endif // skgpu_Surface_Graphite_DEFINED