Index: src/gpu/gl/GrGLGpu.h |
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h |
index 62803ee84c943eb378bbbfbac0b72a506ff66ddf..3fe42048078c456f971f5b84aa0562b885ffffff 100644 |
--- a/src/gpu/gl/GrGLGpu.h |
+++ b/src/gpu/gl/GrGLGpu.h |
@@ -18,7 +18,6 @@ |
#include "GrGLVertexArray.h" |
#include "GrGpu.h" |
#include "GrTypes.h" |
-#include "GrWindowRectsState.h" |
#include "GrXferProcessor.h" |
#include "SkTArray.h" |
#include "SkTypes.h" |
@@ -315,7 +314,7 @@ |
// disables the scissor |
void disableScissor(); |
- void flushWindowRectangles(const GrWindowRectsState&, const GrGLRenderTarget*); |
+ void flushWindowRectangles(const GrWindowRectangles&, const GrGLRenderTarget*); |
void disableWindowRectangles(); |
void initFSAASupport(); |
@@ -425,36 +424,39 @@ |
class { |
public: |
- bool valid() const { return kInvalidSurfaceOrigin != fRTOrigin; } |
- void invalidate() { fRTOrigin = kInvalidSurfaceOrigin; } |
- bool knownDisabled() const { return this->valid() && !fWindowState.enabled(); } |
- void setDisabled() { fRTOrigin = kDefault_GrSurfaceOrigin, fWindowState.setDisabled(); } |
- |
- void set(GrSurfaceOrigin rtOrigin, const GrGLIRect& viewport, |
- const GrWindowRectsState& windowState) { |
- fRTOrigin = rtOrigin; |
- fViewport = viewport; |
- fWindowState = windowState; |
- } |
- |
- bool knownEqualTo(GrSurfaceOrigin rtOrigin, const GrGLIRect& viewport, |
- const GrWindowRectsState& windowState) const { |
+ bool valid() const { return kInvalidOrigin != fOrigin; } |
+ void invalidate() { fOrigin = kInvalidOrigin; } |
+ |
+ bool disabled() const { |
+ return this->valid() && Mode::kExclusive == fWindows.mode() && !fWindows.count(); |
+ } |
+ void setDisabled() { fOrigin = kDefault_GrSurfaceOrigin, fWindows.reset(); } |
+ |
+ bool equal(GrSurfaceOrigin org, const GrGLIRect& viewp, |
+ const GrWindowRectangles& windows) const { |
if (!this->valid()) { |
return false; |
} |
- if (fWindowState.numWindows() && (fRTOrigin != rtOrigin || fViewport != viewport)) { |
+ if (fWindows.count() && (fOrigin != org || fViewport != viewp)) { |
return false; |
} |
- return fWindowState.cheapEqualTo(windowState); |
+ return fWindows == windows; |
+ } |
+ |
+ void set(GrSurfaceOrigin org, const GrGLIRect& viewp, const GrWindowRectangles& windows) { |
+ fOrigin = org; |
+ fViewport = viewp; |
+ fWindows = windows; |
} |
private: |
- enum { kInvalidSurfaceOrigin = -1 }; |
- |
- int fRTOrigin; |
+ typedef GrWindowRectangles::Mode Mode; |
+ enum { kInvalidOrigin = -1 }; |
+ |
+ int fOrigin; |
GrGLIRect fViewport; |
- GrWindowRectsState fWindowState; |
- } fHWWindowRectsState; |
+ GrWindowRectangles fWindows; |
+ } fHWWindowRects; |
GrGLIRect fHWViewport; |