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

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

Issue 504313002: Make GrGpuResources register with GrResourceCache2 after fully constructed. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix insertion for GlyphPathRange. Created 6 years, 3 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/gl/GrGLRenderTarget.cpp ('k') | src/gpu/gl/GrGLTexture.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 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 8
9 #ifndef GrGLStencilBuffer_DEFINED 9 #ifndef GrGLStencilBuffer_DEFINED
10 #define GrGLStencilBuffer_DEFINED 10 #define GrGLStencilBuffer_DEFINED
(...skipping 14 matching lines...) Expand all
25 25
26 GrGLStencilBuffer(GrGpu* gpu, 26 GrGLStencilBuffer(GrGpu* gpu,
27 bool isWrapped, 27 bool isWrapped,
28 GrGLint rbid, 28 GrGLint rbid,
29 int width, int height, 29 int width, int height,
30 int sampleCnt, 30 int sampleCnt,
31 const Format& format) 31 const Format& format)
32 : GrStencilBuffer(gpu, isWrapped, width, height, format.fStencilBits, sa mpleCnt) 32 : GrStencilBuffer(gpu, isWrapped, width, height, format.fStencilBits, sa mpleCnt)
33 , fFormat(format) 33 , fFormat(format)
34 , fRenderbufferID(rbid) { 34 , fRenderbufferID(rbid) {
35 this->registerWithCache();
35 } 36 }
36 37
37 virtual ~GrGLStencilBuffer(); 38 virtual ~GrGLStencilBuffer();
38 39
39 virtual size_t gpuMemorySize() const SK_OVERRIDE; 40 virtual size_t gpuMemorySize() const SK_OVERRIDE;
40 41
41 GrGLuint renderbufferID() const { 42 GrGLuint renderbufferID() const {
42 return fRenderbufferID; 43 return fRenderbufferID;
43 } 44 }
44 45
45 const Format& format() const { return fFormat; } 46 const Format& format() const { return fFormat; }
46 47
47 protected: 48 protected:
48 // overrides of GrResource 49 // overrides of GrResource
49 virtual void onRelease() SK_OVERRIDE; 50 virtual void onRelease() SK_OVERRIDE;
50 virtual void onAbandon() SK_OVERRIDE; 51 virtual void onAbandon() SK_OVERRIDE;
51 52
52 private: 53 private:
53 Format fFormat; 54 Format fFormat;
54 // may be zero for external SBs associated with external RTs 55 // may be zero for external SBs associated with external RTs
55 // (we don't require the client to give us the id, just tell 56 // (we don't require the client to give us the id, just tell
56 // us how many bits of stencil there are). 57 // us how many bits of stencil there are).
57 GrGLuint fRenderbufferID; 58 GrGLuint fRenderbufferID;
58 59
59 typedef GrStencilBuffer INHERITED; 60 typedef GrStencilBuffer INHERITED;
60 }; 61 };
61 62
62 #endif 63 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLRenderTarget.cpp ('k') | src/gpu/gl/GrGLTexture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698