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

Unified Diff: cc/resources/returned_resource.h

Issue 2689563005: Surfaces: Receive resources only once (Closed)
Patch Set: Added a unit test Created 3 years, 10 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 | « no previous file | cc/surfaces/compositor_frame_sink_support_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/returned_resource.h
diff --git a/cc/resources/returned_resource.h b/cc/resources/returned_resource.h
index 35de506a80621469353104d50a90aff5217c541c..6fb4af7b5b6889bdf9b51a560e5cbd2396255dfb 100644
--- a/cc/resources/returned_resource.h
+++ b/cc/resources/returned_resource.h
@@ -18,6 +18,16 @@ namespace cc {
// first passed to the parent compositor.
struct CC_EXPORT ReturnedResource {
ReturnedResource() : id(0), count(0), lost(false) {}
+
+ bool operator==(const ReturnedResource& other) const {
+ return id == other.id && sync_token == other.sync_token &&
+ count == other.count && lost == other.lost;
+ }
+
+ bool operator!=(const ReturnedResource& other) const {
+ return !(*this == other);
+ }
+
// |id| is an identifier generated by the child compositor that uniquely
// identifies a resource. This is the same ID space as TransferableResource.
ResourceId id;
« no previous file with comments | « no previous file | cc/surfaces/compositor_frame_sink_support_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698