Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(255)

Unified Diff: src/gpu/GrReducedClip.h

Issue 2312173002: Revert of Improve usage of window rectangles (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_drawsinreducedclip
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrPipeline.cpp ('k') | src/gpu/GrReducedClip.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrReducedClip.h
diff --git a/src/gpu/GrReducedClip.h b/src/gpu/GrReducedClip.h
index b8413e6df419172a13be12b0f1f9d2b58b1625b2..731d58f61c561d44e15f5ec6ada527d84c81027f 100644
--- a/src/gpu/GrReducedClip.h
+++ b/src/gpu/GrReducedClip.h
@@ -8,7 +8,6 @@
#ifndef GrReducedClip_DEFINED
#define GrReducedClip_DEFINED
-#include "GrWindowRectangles.h"
#include "SkClipStack.h"
#include "SkTLList.h"
@@ -21,11 +20,11 @@
*/
class SK_API GrReducedClip {
public:
- GrReducedClip(const SkClipStack&, const SkRect& queryBounds, int maxWindowRectangles = 0);
+ GrReducedClip(const SkClipStack& stack, const SkRect& queryBounds);
/**
- * If hasIBounds() is true, this is the bounding box within which the clip elements are valid.
- * The caller must not modify any pixels outside this box. Undefined if hasIBounds() is false.
+ * If hasIBounds() is true, this is the bounding box within which the reduced clip is valid, and
+ * the caller must not modify any pixels outside this box. Undefined if hasIBounds() is false.
*/
const SkIRect& ibounds() const { SkASSERT(fHasIBounds); return fIBounds; }
int left() const { return this->ibounds().left(); }
@@ -39,16 +38,10 @@
*/
bool hasIBounds() const { return fHasIBounds; }
- /**
- * If nonempty, this is a set of "exclusive" windows within which the clip elements are NOT
- * valid. The caller must not modify any pixels inside these windows.
- */
- const GrWindowRectangles& windowRectangles() const { return fWindowRects; }
-
typedef SkTLList<SkClipStack::Element, 16> ElementList;
/**
- * Populated with a minimal list of elements required to fully implement the clip.
+ * Populated with a minimal list of elements that implement the clip.
*/
const ElementList& elements() const { return fElements; }
@@ -74,18 +67,15 @@
bool drawStencilClipMask(GrContext*, GrDrawContext*, const SkIPoint& clipOrigin) const;
private:
- void walkStack(const SkClipStack&, const SkRect& queryBounds, int maxWindowRectangles);
- void addInteriorWindowRectangles(int maxWindowRectangles);
- void addWindowRectangle(const SkRect& elementInteriorRect, bool elementIsAA);
+ void walkStack(const SkClipStack&, const SkRect& queryBounds);
bool intersectIBounds(const SkIRect&);
- SkIRect fIBounds;
- bool fHasIBounds;
- GrWindowRectangles fWindowRects;
- ElementList fElements;
- int32_t fElementsGenID;
- bool fRequiresAA;
- InitialState fInitialState;
+ SkIRect fIBounds;
+ bool fHasIBounds;
+ ElementList fElements;
+ int32_t fElementsGenID;
+ bool fRequiresAA;
+ InitialState fInitialState;
};
#endif
« no previous file with comments | « src/gpu/GrPipeline.cpp ('k') | src/gpu/GrReducedClip.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698