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

Unified Diff: src/gpu/gl/GrGLContext.h

Issue 12843026: Make GrDrawTarget::Caps ref counted and GrGLCaps derive from it. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/gl/GrGLContext.h
===================================================================
--- src/gpu/gl/GrGLContext.h (revision 8359)
+++ src/gpu/gl/GrGLContext.h (working copy)
@@ -26,7 +26,10 @@
/**
* Default constructor
*/
- GrGLContextInfo() { this->reset(); }
+ GrGLContextInfo() {
+ fGLCaps.reset(SkNEW(GrGLCaps));
+ this->reset();
+ }
/**
* Copies a GrGLContextInfo
@@ -44,8 +47,8 @@
GrGLVersion version() const { return fGLVersion; }
GrGLSLGeneration glslGeneration() const { return fGLSLGeneration; }
GrGLVendor vendor() const { return fVendor; }
- const GrGLCaps& caps() const { return fGLCaps; }
- GrGLCaps& caps() { return fGLCaps; }
+ const GrGLCaps* caps() const { return fGLCaps.get(); }
+ GrGLCaps* caps() { return fGLCaps; }
/**
* Checks for extension support using a cached copy of the GL_EXTENSIONS
@@ -65,12 +68,12 @@
private:
- GrGLBinding fBindingInUse;
- GrGLVersion fGLVersion;
- GrGLSLGeneration fGLSLGeneration;
- GrGLVendor fVendor;
- GrGLExtensions fExtensions;
- GrGLCaps fGLCaps;
+ GrGLBinding fBindingInUse;
+ GrGLVersion fGLVersion;
+ GrGLSLGeneration fGLSLGeneration;
+ GrGLVendor fVendor;
+ GrGLExtensions fExtensions;
+ SkAutoTUnref<GrGLCaps> fGLCaps;
};
/**
« no previous file with comments | « src/gpu/gl/GrGLCaps.cpp ('k') | src/gpu/gl/GrGLContext.cpp » ('j') | src/gpu/gl/GrGLContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698