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

Side by Side Diff: src/gpu/gl/GrGLBufferImpl.h

Issue 275493004: Rename from "(un)lock" to "(un)map" for geometry buffers. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Address Rob's comments Created 6 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/gl/GrGLBufferImpl.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 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 GrGLBufferImpl_DEFINED 8 #ifndef GrGLBufferImpl_DEFINED
9 #define GrGLBufferImpl_DEFINED 9 #define GrGLBufferImpl_DEFINED
10 10
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 34
35 void abandon(); 35 void abandon();
36 void release(GrGpuGL* gpu); 36 void release(GrGpuGL* gpu);
37 37
38 GrGLuint bufferID() const { return fDesc.fID; } 38 GrGLuint bufferID() const { return fDesc.fID; }
39 size_t baseOffset() const { return reinterpret_cast<size_t>(fCPUData); } 39 size_t baseOffset() const { return reinterpret_cast<size_t>(fCPUData); }
40 40
41 void bind(GrGpuGL* gpu) const; 41 void bind(GrGpuGL* gpu) const;
42 42
43 void* lock(GrGpuGL* gpu); 43 void* map(GrGpuGL* gpu);
44 void* lockPtr() const { return fLockPtr; } 44 void* mapPtr() const { return fMapPtr; }
45 void unlock(GrGpuGL* gpu); 45 void unmap(GrGpuGL* gpu);
46 bool isLocked() const; 46 bool isMapped() const;
47 bool updateData(GrGpuGL* gpu, const void* src, size_t srcSizeInBytes); 47 bool updateData(GrGpuGL* gpu, const void* src, size_t srcSizeInBytes);
48 48
49 private: 49 private:
50 void validate() const; 50 void validate() const;
51 51
52 Desc fDesc; 52 Desc fDesc;
53 GrGLenum fBufferType; // GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER 53 GrGLenum fBufferType; // GL_ARRAY_BUFFER or GL_ELEMENT_ARRAY_BUFFER
54 void* fCPUData; 54 void* fCPUData;
55 void* fLockPtr; 55 void* fMapPtr;
56 size_t fGLSizeInBytes; // In certain cases we make the size of the GL buffer object 56 size_t fGLSizeInBytes; // In certain cases we make the size of the GL buffer object
57 // smaller or larger than the size in fDesc . 57 // smaller or larger than the size in fDesc .
58 58
59 typedef SkNoncopyable INHERITED; 59 typedef SkNoncopyable INHERITED;
60 }; 60 };
61 61
62 #endif 62 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrInOrderDrawBuffer.cpp ('k') | src/gpu/gl/GrGLBufferImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698