Make a bunch of virtuals in GrDrawTarget and GrGpu private. Subclasses shouldn't call them directly.
R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7228048
git-svn-id: http://skia.googlecode.com/svn/trunk@7413 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/src/gpu/GrInOrderDrawBuffer.cpp b/src/gpu/GrInOrderDrawBuffer.cpp
index 87ecc85..aceff2e 100644
--- a/src/gpu/GrInOrderDrawBuffer.cpp
+++ b/src/gpu/GrInOrderDrawBuffer.cpp
@@ -167,13 +167,13 @@
GrRect devClipRect;
bool isIntersectionOfRects = false;
-
- fClip->fClipStack->getConservativeBounds(-fClip->fOrigin.fX,
- -fClip->fOrigin.fY,
- drawState->getRenderTarget()->width(),
- drawState->getRenderTarget()->height(),
- &devClipRect,
- &isIntersectionOfRects);
+ const GrClipData* clip = this->getClip();
+ clip->fClipStack->getConservativeBounds(-clip->fOrigin.fX,
+ -clip->fOrigin.fY,
+ drawState->getRenderTarget()->width(),
+ drawState->getRenderTarget()->height(),
+ &devClipRect,
+ &isIntersectionOfRects);
if (isIntersectionOfRects) {
// If the clip rect touches the edge of the viewport, extended it
@@ -872,8 +872,8 @@
if (this->getDrawState().isClipState()) {
if (fClipSet &&
(fClips.empty() ||
- fClips.back() != *fClip->fClipStack ||
- fClipOrigins.back() != fClip->fOrigin)) {
+ fClips.back() != *this->getClip()->fClipStack ||
+ fClipOrigins.back() != this->getClip()->fOrigin)) {
return true;
}
}
@@ -881,8 +881,8 @@
}
void GrInOrderDrawBuffer::recordClip() {
- fClips.push_back() = *fClip->fClipStack;
- fClipOrigins.push_back() = fClip->fOrigin;
+ fClips.push_back() = *this->getClip()->fClipStack;
+ fClipOrigins.push_back() = this->getClip()->fOrigin;
fClipSet = false;
fCmds.push_back(kSetClip_Cmd);
}