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

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

Issue 1225923010: Refugee from Dead Machine 4: MDB Monster Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Last update from dead machine Created 4 years, 7 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
« no previous file with comments | « src/gpu/GrFontAtlasSizes.h ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 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 GrGeometryBuffer_DEFINED 10 #ifndef GrGeometryBuffer_DEFINED
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 * @return returns true if the update succeeds, false otherwise. 93 * @return returns true if the update succeeds, false otherwise.
94 */ 94 */
95 bool updateData(const void* src, size_t srcSizeInBytes) { 95 bool updateData(const void* src, size_t srcSizeInBytes) {
96 SkASSERT(!this->isMapped()); 96 SkASSERT(!this->isMapped());
97 SkASSERT(srcSizeInBytes <= fGpuMemorySize); 97 SkASSERT(srcSizeInBytes <= fGpuMemorySize);
98 return this->onUpdateData(src, srcSizeInBytes); 98 return this->onUpdateData(src, srcSizeInBytes);
99 } 99 }
100 100
101 protected: 101 protected:
102 GrGeometryBuffer(GrGpu* gpu, size_t gpuMemorySize, bool dynamic, bool cpuBac ked) 102 GrGeometryBuffer(GrGpu* gpu, size_t gpuMemorySize, bool dynamic, bool cpuBac ked)
103 : INHERITED(gpu, kCached_LifeCycle) 103 : INHERITED(gpu, kCached_LifeCycle, GrGpuResource::kOther)
104 , fMapPtr(nullptr) 104 , fMapPtr(nullptr)
105 , fGpuMemorySize(gpuMemorySize) 105 , fGpuMemorySize(gpuMemorySize)
106 , fDynamic(dynamic) 106 , fDynamic(dynamic)
107 , fCPUBacked(cpuBacked) {} 107 , fCPUBacked(cpuBacked) {}
108 108
109 private: 109 private:
110 virtual size_t onGpuMemorySize() const { return fGpuMemorySize; } 110 virtual size_t onGpuMemorySize() const { return fGpuMemorySize; }
111 111
112 virtual void* onMap() = 0; 112 virtual void* onMap() = 0;
113 virtual void onUnmap() = 0; 113 virtual void onUnmap() = 0;
114 virtual bool onUpdateData(const void* src, size_t srcSizeInBytes) = 0; 114 virtual bool onUpdateData(const void* src, size_t srcSizeInBytes) = 0;
115 115
116 void* fMapPtr; 116 void* fMapPtr;
117 size_t fGpuMemorySize; 117 size_t fGpuMemorySize;
118 bool fDynamic; 118 bool fDynamic;
119 bool fCPUBacked; 119 bool fCPUBacked;
120 120
121 typedef GrGpuResource INHERITED; 121 typedef GrGpuResource INHERITED;
122 }; 122 };
123 123
124 #endif 124 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrFontAtlasSizes.h ('k') | src/gpu/GrGpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698