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

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

Issue 729683002: Make GrResourceCache2 responsible for calling release, abandon, and ~. (Closed) Base URL: https://skia.googlesource.com/skia.git@revrev
Patch Set: tiny cleanup Created 6 years, 1 month 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/GrResourceCache2.cpp ('k') | src/gpu/gl/GrGLPath.h » ('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 2011 Google Inc. 2 * Copyright 2011 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 GrGLIndexBuffer_DEFINED 8 #ifndef GrGLIndexBuffer_DEFINED
9 #define GrGLIndexBuffer_DEFINED 9 #define GrGLIndexBuffer_DEFINED
10 10
11 #include "GrIndexBuffer.h" 11 #include "GrIndexBuffer.h"
12 #include "GrGLBufferImpl.h" 12 #include "GrGLBufferImpl.h"
13 #include "gl/GrGLInterface.h" 13 #include "gl/GrGLInterface.h"
14 14
15 class GrGpuGL; 15 class GrGpuGL;
16 16
17 class GrGLIndexBuffer : public GrIndexBuffer { 17 class GrGLIndexBuffer : public GrIndexBuffer {
18 18
19 public: 19 public:
20 typedef GrGLBufferImpl::Desc Desc; 20 typedef GrGLBufferImpl::Desc Desc;
21 21
22 GrGLIndexBuffer(GrGpuGL* gpu, const Desc& desc); 22 GrGLIndexBuffer(GrGpuGL* gpu, const Desc& desc);
23 virtual ~GrGLIndexBuffer() { this->release(); }
24 23
25 GrGLuint bufferID() const { return fImpl.bufferID(); } 24 GrGLuint bufferID() const { return fImpl.bufferID(); }
26 size_t baseOffset() const { return fImpl.baseOffset(); } 25 size_t baseOffset() const { return fImpl.baseOffset(); }
27 26
28 void bind() const { 27 void bind() const {
29 if (!this->wasDestroyed()) { 28 if (!this->wasDestroyed()) {
30 fImpl.bind(this->getGpuGL()); 29 fImpl.bind(this->getGpuGL());
31 } 30 }
32 } 31 }
33 32
(...skipping 10 matching lines...) Expand all
44 SkASSERT(!this->wasDestroyed()); 43 SkASSERT(!this->wasDestroyed());
45 return (GrGpuGL*)(this->getGpu()); 44 return (GrGpuGL*)(this->getGpu());
46 } 45 }
47 46
48 GrGLBufferImpl fImpl; 47 GrGLBufferImpl fImpl;
49 48
50 typedef GrIndexBuffer INHERITED; 49 typedef GrIndexBuffer INHERITED;
51 }; 50 };
52 51
53 #endif 52 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrResourceCache2.cpp ('k') | src/gpu/gl/GrGLPath.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698