Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(139)

Side by Side Diff: src/gpu/GrTransferBuffer.h

Issue 1810323002: Cache render targets that render to wrapped textures Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« no previous file with comments | « src/gpu/GrTextureProvider.cpp ('k') | src/gpu/gl/GrGLGpu.h » ('j') | src/gpu/gl/GrGLGpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698