2 * Copyright 2014 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
8 #ifndef SkSurface_Gpu_DEFINED
9 #define SkSurface_Gpu_DEFINED
11 #include "SkSurface_Base.h"
17 class SkSurface_Gpu : public SkSurface_Base {
19 SK_DECLARE_INST_COUNT(SkSurface_Gpu)
21 SkSurface_Gpu(SkGpuDevice*);
22 virtual ~SkSurface_Gpu();
24 SkCanvas* onNewCanvas() SK_OVERRIDE;
25 SkSurface* onNewSurface(const SkImageInfo&) SK_OVERRIDE;
26 SkImage* onNewImageSnapshot(Budgeted) SK_OVERRIDE;
27 virtual void onDraw(SkCanvas*, SkScalar x, SkScalar y,
28 const SkPaint*) SK_OVERRIDE;
29 void onCopyOnWrite(ContentChangeMode) SK_OVERRIDE;
30 void onDiscard() SK_OVERRIDE;
32 SkGpuDevice* getDevice() { return fDevice; }
37 typedef SkSurface_Base INHERITED;
40 #endif // SK_SUPPORT_GPU
42 #endif // SkSurface_Gpu_DEFINED