Make GrDrawTarget::Caps ref counted and GrGLCaps derive from it.

Also rename GrDrawTarget::getCaps() -> GrDrawTarget::caps().
Review URL: https://codereview.chromium.org/12843026

git-svn-id: http://skia.googlecode.com/svn/trunk@8364 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/gl/GrGLContext.cpp b/src/gpu/gl/GrGLContext.cpp
index 0c3f0eb..d384b4e 100644
--- a/src/gpu/gl/GrGLContext.cpp
+++ b/src/gpu/gl/GrGLContext.cpp
@@ -14,7 +14,7 @@
     fGLSLGeneration = ctxInfo.fGLSLGeneration;
     fVendor = ctxInfo.fVendor;
     fExtensions = ctxInfo.fExtensions;
-    fGLCaps = ctxInfo.fGLCaps;
+    *fGLCaps = *ctxInfo.fGLCaps.get();
     return *this;
 }
 
@@ -36,7 +36,7 @@
             fGLSLGeneration = GrGetGLSLGeneration(fBindingInUse, interface);
 
             fVendor = GrGLGetVendor(interface);
-            fGLCaps.init(*this, interface);
+            fGLCaps->init(*this, interface);
             return true;
         }
     }
@@ -53,7 +53,7 @@
     fGLSLGeneration = static_cast<GrGLSLGeneration>(0);
     fVendor = kOther_GrGLVendor;
     fExtensions.reset();
-    fGLCaps.reset();
+    fGLCaps->reset();
 }
 
 ////////////////////////////////////////////////////////////////////////////////