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

Unified Diff: components/exo/surface.h

Issue 2032173002: exo: Allow updating cc::Surface viewport and crop state independently. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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: components/exo/surface.h
diff --git a/components/exo/surface.h b/components/exo/surface.h
index 3bcdafe5a16b01f3e783a01f719c8c3b25df0350..8c22cd5e3c84c4539dcfaa098eb5531f62ad2603 100644
--- a/components/exo/surface.h
+++ b/components/exo/surface.h
@@ -15,6 +15,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/observer_list.h"
+#include "cc/resources/transferable_resource.h"
#include "cc/surfaces/surface_factory_client.h"
#include "third_party/skia/include/core/SkRegion.h"
#include "third_party/skia/include/core/SkXfermode.h"
@@ -238,6 +239,8 @@ class Surface : public aura::Window,
// effect next time Commit() is called.
bool has_pending_contents_;
+ bool changed_viewport_or_crop_ = false;
+
// The buffer that will become the content of surface when Commit() is called.
base::WeakPtr<Buffer> pending_buffer_;
@@ -249,7 +252,7 @@ class Surface : public aura::Window,
cc::SurfaceId surface_id_;
// The next resource id the buffer will be attached to.
- int next_resource_id_ = 0;
+ int next_resource_id_ = 1;
// The damage region to schedule paint for when Commit() is called.
SkRegion pending_damage_;
@@ -301,6 +304,9 @@ class Surface : public aura::Window,
// The buffer that is currently set as content of surface.
base::WeakPtr<Buffer> current_buffer_;
+ // The last resource that was sent to a surface.
+ cc::TransferableResource current_resource_;
+
// The active input region used for hit testing.
SkRegion input_region_;

Powered by Google App Engine
This is Rietveld 408576698