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/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index 6966858..2e86147 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -29,7 +29,7 @@
, fFlushing(false) {
fDstGpu->ref();
- fCaps = fDstGpu->getCaps();
+ fCaps.reset(SkRef(fDstGpu->caps()));
GrAssert(NULL != vertexPool);
GrAssert(NULL != indexPool);
@@ -99,7 +99,7 @@
// optimizations help determine whether coverage and color can be blended correctly when
// dual-source blending isn't available. This comes into play when there is coverage. If colors
// were a stage it could take a hint that every vertex's color will be opaque.
- if (this->getCaps().dualSourceBlendingSupport() ||
+ if (this->caps()->dualSourceBlendingSupport() ||
drawState->hasSolidCoverage(drawState->getAttribBindings())) {
bindings |= GrDrawState::kColor_AttribBindingsBit;
drawState->setAttribIndex(GrDrawState::kColor_AttribIndex, attribs.count());