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

Unified Diff: cc/blimp/deserialized_content_layer_client.h

Issue 2397843003: cc/blimp: Add (de)-serialization for PictureLayer and ScrollbarLayer. (Closed)
Patch Set: Addressed comments Created 4 years, 2 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 | « cc/blimp/compositor_state_deserializer_unittest.cc ('k') | cc/blimp/deserialized_content_layer_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/blimp/deserialized_content_layer_client.h
diff --git a/cc/blimp/deserialized_content_layer_client.h b/cc/blimp/deserialized_content_layer_client.h
new file mode 100644
index 0000000000000000000000000000000000000000..af99ba9dc7b465573494554f75a02e245808ab84
--- /dev/null
+++ b/cc/blimp/deserialized_content_layer_client.h
@@ -0,0 +1,42 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_BLIMP_DESERIALIZED_CONTENT_LAYER_CLIENT_H_
+#define CC_BLIMP_DESERIALIZED_CONTENT_LAYER_CLIENT_H_
+
+#include "base/macros.h"
+#include "cc/layers/content_layer_client.h"
+
+namespace cc {
+
+// The ContentLayerClient used by the PictureLayers created for the remote
+// client. This holds the deserialized DisplayItemList received from the
+// corresponding PictureLayer's client on the engine.
+class DeserializedContentLayerClient : public ContentLayerClient {
+ public:
+ DeserializedContentLayerClient();
+ ~DeserializedContentLayerClient() override;
+
+ // Updates from the display list update received from the engine.
+ void UpdateDisplayListAndRecordedViewport(
+ scoped_refptr<DisplayItemList> display_list,
+ gfx::Rect recorded_viewport);
+
+ // ContentLayerClient implementation.
+ gfx::Rect PaintableRegion() override;
+ scoped_refptr<DisplayItemList> PaintContentsToDisplayList(
+ PaintingControlSetting painting_status) override;
+ bool FillsBoundsCompletely() const override;
+ size_t GetApproximateUnsharedMemoryUsage() const override;
+
+ private:
+ scoped_refptr<DisplayItemList> display_list_;
+ gfx::Rect recorded_viewport_;
+
+ DISALLOW_COPY_AND_ASSIGN(DeserializedContentLayerClient);
+};
+
+} // namespace cc
+
+#endif // CC_BLIMP_DESERIALIZED_CONTENT_LAYER_CLIENT_H_
« no previous file with comments | « cc/blimp/compositor_state_deserializer_unittest.cc ('k') | cc/blimp/deserialized_content_layer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698