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

Unified Diff: third_party/WebKit/Source/platform/graphics/paint/PaintChunk.h

Issue 1632263002: Calculate and track display item opaqueness (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Be more conservative about rounding Created 4 years, 11 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
Index: third_party/WebKit/Source/platform/graphics/paint/PaintChunk.h
diff --git a/third_party/WebKit/Source/platform/graphics/paint/PaintChunk.h b/third_party/WebKit/Source/platform/graphics/paint/PaintChunk.h
index e072a4def9ebb7a5045234a9a0c14f40489933ee..add21e86005c842178962041d7a6b84a7d3e8dea 100644
--- a/third_party/WebKit/Source/platform/graphics/paint/PaintChunk.h
+++ b/third_party/WebKit/Source/platform/graphics/paint/PaintChunk.h
@@ -20,9 +20,9 @@ namespace blink {
// This is a Slimming Paint v2 class.
struct PaintChunk {
DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
- PaintChunk() : beginIndex(0), endIndex(0) { }
+ PaintChunk() : beginIndex(0), endIndex(0), knownToBeOpaque(false) { }
PaintChunk(unsigned begin, unsigned end, const PaintChunkProperties& props)
- : beginIndex(begin), endIndex(end), properties(props) { }
+ : beginIndex(begin), endIndex(end), properties(props), knownToBeOpaque(false) { }
// Index of the first drawing in this chunk.
unsigned beginIndex;
@@ -36,6 +36,9 @@ struct PaintChunk {
// The total bounds of this paint chunk's contents.
FloatRect bounds;
+
+ // True if the bounds are filled entirely with opaque contents.
+ bool knownToBeOpaque;
};
inline bool operator==(const PaintChunk& a, const PaintChunk& b)
@@ -43,7 +46,8 @@ inline bool operator==(const PaintChunk& a, const PaintChunk& b)
return a.beginIndex == b.beginIndex
&& a.endIndex == b.endIndex
&& a.properties == b.properties
- && a.bounds == b.bounds;
+ && a.bounds == b.bounds
+ && a.knownToBeOpaque == b.knownToBeOpaque;
}
inline bool operator!=(const PaintChunk& a, const PaintChunk& b)

Powered by Google App Engine
This is Rietveld 408576698