| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef GrTransferBuffer_DEFINED | 10 #ifndef GrTransferBuffer_DEFINED |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 /** | 51 /** |
| 52 Queries whether the buffer has been mapped. | 52 Queries whether the buffer has been mapped. |
| 53 | 53 |
| 54 @return true if the buffer is mapped, false otherwise. | 54 @return true if the buffer is mapped, false otherwise. |
| 55 */ | 55 */ |
| 56 bool isMapped() const { return SkToBool(fMapPtr); } | 56 bool isMapped() const { return SkToBool(fMapPtr); } |
| 57 | 57 |
| 58 protected: | 58 protected: |
| 59 GrTransferBuffer(GrGpu* gpu, size_t gpuMemorySize) | 59 GrTransferBuffer(GrGpu* gpu, size_t gpuMemorySize) |
| 60 : INHERITED(gpu, kUncached_LifeCycle) | 60 : INHERITED(gpu, SkBudgeted::kNo) |
| 61 , fGpuMemorySize(gpuMemorySize) { | 61 , fGpuMemorySize(gpuMemorySize) { |
| 62 } | 62 } |
| 63 | 63 |
| 64 private: | 64 private: |
| 65 virtual size_t onGpuMemorySize() const { return fGpuMemorySize; } | 65 virtual size_t onGpuMemorySize() const { return fGpuMemorySize; } |
| 66 | 66 |
| 67 virtual void* onMap() = 0; | 67 virtual void* onMap() = 0; |
| 68 virtual void onUnmap() = 0; | 68 virtual void onUnmap() = 0; |
| 69 | 69 |
| 70 void* fMapPtr; | 70 void* fMapPtr; |
| 71 size_t fGpuMemorySize; | 71 size_t fGpuMemorySize; |
| 72 | 72 |
| 73 typedef GrGpuResource INHERITED; | 73 typedef GrGpuResource INHERITED; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 #endif | 76 #endif |
| OLD | NEW |