aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/gl
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-17 21:39:42 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-17 21:39:42 +0000
commitfd03d4a829efe2d77a712fd991927c55f59a2ffe (patch)
treeb207777f1e3fe70b5823a2bc166a75c71f311036 /src/gpu/gl
parent5dd567c2a55c16c8bc2668902cdfce1734dfae8f (diff)
Replace all instances of GrRect with SkRect.
And remove the typedef in GrRect.h. The same with GrIRect. R=robertphillips@google.com Author: tfarina@chromium.org Review URL: https://chromiumcodereview.appspot.com/19449002 git-svn-id: http://skia.googlecode.com/svn/trunk@10130 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/gpu/gl')
-rw-r--r--src/gpu/gl/GrGpuGL.cpp24
-rw-r--r--src/gpu/gl/GrGpuGL.h9
-rw-r--r--src/gpu/gl/GrGpuGL_program.cpp4
3 files changed, 17 insertions, 20 deletions
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
index 0ffcc27222..cf6cf413e7 100644
--- a/src/gpu/gl/GrGpuGL.cpp
+++ b/src/gpu/gl/GrGpuGL.cpp
@@ -542,8 +542,8 @@ bool adjust_pixel_ops_params(int surfaceWidth,
*rowBytes = *width * bpp;
}
- GrIRect subRect = GrIRect::MakeXYWH(*left, *top, *width, *height);
- GrIRect bounds = GrIRect::MakeWH(surfaceWidth, surfaceHeight);
+ SkIRect subRect = SkIRect::MakeXYWH(*left, *top, *width, *height);
+ SkIRect bounds = SkIRect::MakeWH(surfaceWidth, surfaceHeight);
if (!subRect.intersect(bounds)) {
return false;
@@ -1269,17 +1269,17 @@ void GrGpuGL::flushScissor() {
}
}
-void GrGpuGL::onClear(const GrIRect* rect, GrColor color) {
+void GrGpuGL::onClear(const SkIRect* rect, GrColor color) {
const GrDrawState& drawState = this->getDrawState();
const GrRenderTarget* rt = drawState.getRenderTarget();
// parent class should never let us get here with no RT
GrAssert(NULL != rt);
- GrIRect clippedRect;
+ SkIRect clippedRect;
if (NULL != rect) {
// flushScissor expects rect to be clipped to the target.
clippedRect = *rect;
- GrIRect rtRect = SkIRect::MakeWH(rt->width(), rt->height());
+ SkIRect rtRect = SkIRect::MakeWH(rt->width(), rt->height());
if (clippedRect.intersect(rtRect)) {
rect = &clippedRect;
} else {
@@ -1313,7 +1313,7 @@ void GrGpuGL::clearStencil() {
return;
}
- this->flushRenderTarget(&GrIRect::EmptyIRect());
+ this->flushRenderTarget(&SkIRect::EmptyIRect());
GrAutoTRestore<ScissorState> asr(&fScissorState);
fScissorState.fEnabled = false;
@@ -1325,7 +1325,7 @@ void GrGpuGL::clearStencil() {
fHWStencilSettings.invalidate();
}
-void GrGpuGL::clearStencilClip(const GrIRect& rect, bool insideClip) {
+void GrGpuGL::clearStencilClip(const SkIRect& rect, bool insideClip) {
const GrDrawState& drawState = this->getDrawState();
const GrRenderTarget* rt = drawState.getRenderTarget();
GrAssert(NULL != rt);
@@ -1351,7 +1351,7 @@ void GrGpuGL::clearStencilClip(const GrIRect& rect, bool insideClip) {
} else {
value = 0;
}
- this->flushRenderTarget(&GrIRect::EmptyIRect());
+ this->flushRenderTarget(&SkIRect::EmptyIRect());
GrAutoTRestore<ScissorState> asr(&fScissorState);
fScissorState.fEnabled = true;
@@ -1365,7 +1365,7 @@ void GrGpuGL::clearStencilClip(const GrIRect& rect, bool insideClip) {
}
void GrGpuGL::onForceRenderTargetFlush() {
- this->flushRenderTarget(&GrIRect::EmptyIRect());
+ this->flushRenderTarget(&SkIRect::EmptyIRect());
}
bool GrGpuGL::readPixelsWillPayForYFlip(GrRenderTarget* renderTarget,
@@ -1427,7 +1427,7 @@ bool GrGpuGL::onReadPixels(GrRenderTarget* target,
return false;
case GrGLRenderTarget::kAutoResolves_ResolveType:
artr.set(this->drawState(), target);
- this->flushRenderTarget(&GrIRect::EmptyIRect());
+ this->flushRenderTarget(&SkIRect::EmptyIRect());
break;
case GrGLRenderTarget::kCanResolve_ResolveType:
this->onResolveRenderTarget(tgt);
@@ -1522,7 +1522,7 @@ bool GrGpuGL::onReadPixels(GrRenderTarget* target,
return true;
}
-void GrGpuGL::flushRenderTarget(const GrIRect* bound) {
+void GrGpuGL::flushRenderTarget(const SkIRect* bound) {
GrGLRenderTarget* rt =
static_cast<GrGLRenderTarget*>(this->drawState()->getRenderTarget());
@@ -1701,7 +1701,7 @@ void GrGpuGL::onResolveRenderTarget(GrRenderTarget* target) {
// the bound DRAW FBO ID.
fHWBoundRenderTarget = NULL;
const GrGLIRect& vp = rt->getViewport();
- const GrIRect dirtyRect = rt->getResolveRect();
+ const SkIRect dirtyRect = rt->getResolveRect();
GrGLIRect r;
r.setRelativeTo(vp, dirtyRect.fLeft, dirtyRect.fTop,
dirtyRect.width(), dirtyRect.height(), target->origin());
diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h
index 38e5842dce..b5ea2a7be5 100644
--- a/src/gpu/gl/GrGpuGL.h
+++ b/src/gpu/gl/GrGpuGL.h
@@ -5,12 +5,9 @@
* found in the LICENSE file.
*/
-
-
#ifndef GrGpuGL_DEFINED
#define GrGpuGL_DEFINED
-
#include "GrBinHashKey.h"
#include "GrDrawState.h"
#include "GrGpu.h"
@@ -121,7 +118,7 @@ private:
GrStencilBuffer* sb,
GrRenderTarget* rt) SK_OVERRIDE;
- virtual void onClear(const GrIRect* rect, GrColor color) SK_OVERRIDE;
+ virtual void onClear(const SkIRect* rect, GrColor color) SK_OVERRIDE;
virtual void onForceRenderTargetFlush() SK_OVERRIDE;
@@ -148,7 +145,7 @@ private:
virtual void onGpuStencilPath(const GrPath*, SkPath::FillType) SK_OVERRIDE;
virtual void clearStencil() SK_OVERRIDE;
- virtual void clearStencilClip(const GrIRect& rect,
+ virtual void clearStencilClip(const SkIRect& rect,
bool insideClip) SK_OVERRIDE;
virtual bool flushGraphicsState(DrawType, const GrDeviceCoordTexture* dstCopy) SK_OVERRIDE;
@@ -235,7 +232,7 @@ private:
// bound is region that may be modified and therefore has to be resolved.
// NULL means whole target. Can be an empty rect.
- void flushRenderTarget(const GrIRect* bound);
+ void flushRenderTarget(const SkIRect* bound);
void flushStencil(DrawType);
void flushAAState(DrawType);
diff --git a/src/gpu/gl/GrGpuGL_program.cpp b/src/gpu/gl/GrGpuGL_program.cpp
index 5da8ecffbd..a61ca4443a 100644
--- a/src/gpu/gl/GrGpuGL_program.cpp
+++ b/src/gpu/gl/GrGpuGL_program.cpp
@@ -317,8 +317,8 @@ bool GrGpuGL::flushGraphicsState(DrawType type, const GrDeviceCoordTexture* dstC
this->flushScissor();
this->flushAAState(type);
- GrIRect* devRect = NULL;
- GrIRect devClipBounds;
+ SkIRect* devRect = NULL;
+ SkIRect devClipBounds;
if (drawState.isClipState()) {
this->getClip()->getConservativeBounds(drawState.getRenderTarget(), &devClipBounds);
devRect = &devClipBounds;