| OLD | NEW | 
|   1 /* |   1 /* | 
|   2  * Copyright 2014 Google Inc. |   2  * Copyright 2014 Google Inc. | 
|   3  * |   3  * | 
|   4  * Use of this source code is governed by a BSD-style license that can be |   4  * Use of this source code is governed by a BSD-style license that can be | 
|   5  * found in the LICENSE file. |   5  * found in the LICENSE file. | 
|   6  */ |   6  */ | 
|   7  |   7  | 
|   8 #ifndef SkSurface_Gpu_DEFINED |   8 #ifndef SkSurface_Gpu_DEFINED | 
|   9 #define SkSurface_Gpu_DEFINED |   9 #define SkSurface_Gpu_DEFINED | 
|  10  |  10  | 
|  11 #include "SkSurface_Base.h" |  11 #include "SkSurface_Base.h" | 
|  12  |  12  | 
|  13 #if SK_SUPPORT_GPU |  13 #if SK_SUPPORT_GPU | 
|  14  |  14  | 
|  15 class SkGpuDevice; |  15 class SkGpuDevice; | 
|  16  |  16  | 
|  17 class SkSurface_Gpu : public SkSurface_Base { |  17 class SkSurface_Gpu : public SkSurface_Base { | 
|  18 public: |  18 public: | 
|  19     SkSurface_Gpu(SkGpuDevice*); |  19     SkSurface_Gpu(SkGpuDevice*); | 
|  20     virtual ~SkSurface_Gpu(); |  20     virtual ~SkSurface_Gpu(); | 
|  21  |  21  | 
|  22     GrBackendObject onGetTextureHandle(BackendHandleAccess) override; |  22     GrBackendObject onGetTextureHandle(BackendHandleAccess) override; | 
|  23     bool onGetRenderTargetHandle(GrBackendObject*, BackendHandleAccess) override
    ; |  23     bool onGetRenderTargetHandle(GrBackendObject*, BackendHandleAccess) override
    ; | 
|  24     SkCanvas* onNewCanvas() override; |  24     SkCanvas* onNewCanvas() override; | 
|  25     SkSurface* onNewSurface(const SkImageInfo&) override; |  25     SkSurface* onNewSurface(const SkImageInfo&) override; | 
|  26     SkImage* onNewImageSnapshot(Budgeted) override; |  26     SkImage* onNewImageSnapshot(Budgeted) override; | 
|  27     void onCopyOnWrite(ContentChangeMode) override; |  27     void onCopyOnWrite(ContentChangeMode) override; | 
|  28     void onDiscard() override; |  28     void onDiscard() override; | 
 |  29     void onPrepareForExternalIO() override; | 
|  29  |  30  | 
|  30     SkGpuDevice* getDevice() { return fDevice; } |  31     SkGpuDevice* getDevice() { return fDevice; } | 
|  31  |  32  | 
|  32 private: |  33 private: | 
|  33     SkGpuDevice* fDevice; |  34     SkGpuDevice* fDevice; | 
|  34  |  35  | 
|  35     typedef SkSurface_Base INHERITED; |  36     typedef SkSurface_Base INHERITED; | 
|  36 }; |  37 }; | 
|  37  |  38  | 
|  38 #endif // SK_SUPPORT_GPU |  39 #endif // SK_SUPPORT_GPU | 
|  39  |  40  | 
|  40 #endif // SkSurface_Gpu_DEFINED |  41 #endif // SkSurface_Gpu_DEFINED | 
| OLD | NEW |