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

Unified Diff: cc/layers/picture_layer.h

Issue 2141233002: cc: Clean up RecordingSource API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove ContentLayerClient* painter from UpdateAndExpandInvalidation and sync to head Created 4 years, 4 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/layers/picture_layer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer.h
diff --git a/cc/layers/picture_layer.h b/cc/layers/picture_layer.h
index ca7995ed0f23dc6df2606aeae4aed8ce1596fc08..84a906f0862bd5fab341072b580577675e1582ef 100644
--- a/cc/layers/picture_layer.h
+++ b/cc/layers/picture_layer.h
@@ -13,7 +13,12 @@
namespace cc {
+namespace proto {
+class PictureLayerProperties;
+}
+
class ContentLayerClient;
+class DisplayItemList;
class RecordingSource;
class ResourceUpdateQueue;
@@ -33,6 +38,7 @@ class CC_EXPORT PictureLayer : public Layer {
bool Update() override;
void SetIsMask(bool is_mask) override;
sk_sp<SkPicture> GetPicture() const override;
+
bool IsSuitableForGpuRasterization() const override;
void RunMicroBenchmark(MicroBenchmark* benchmark) override;
@@ -43,7 +49,21 @@ class CC_EXPORT PictureLayer : public Layer {
return recording_source_.get();
}
+ const DisplayItemList* GetDisplayItemList();
+
protected:
+ // Encapsulates all data, callbacks or interfaces received from the embedder.
+ struct PictureLayerInputs {
+ PictureLayerInputs();
+ ~PictureLayerInputs();
+
+ ContentLayerClient* client = nullptr;
+ bool nearest_neighbor = false;
+ gfx::Rect recorded_viewport;
+ scoped_refptr<DisplayItemList> display_list;
+ size_t painter_reported_memory_usage = 0;
+ };
+
explicit PictureLayer(ContentLayerClient* client);
// Allow tests to inject a recording source.
PictureLayer(ContentLayerClient* client,
@@ -58,6 +78,8 @@ class CC_EXPORT PictureLayer : public Layer {
bool is_mask() const { return is_mask_; }
+ PictureLayerInputs picture_layer_inputs_;
+
private:
friend class TestSerializationPictureLayer;
@@ -72,14 +94,6 @@ class CC_EXPORT PictureLayer : public Layer {
int update_source_frame_number_;
bool is_mask_;
- // Encapsulates all data, callbacks or interfaces received from the embedder.
- struct PictureLayerInputs {
- ContentLayerClient* client = nullptr;
- bool nearest_neighbor = false;
- };
-
- PictureLayerInputs picture_layer_inputs_;
-
DISALLOW_COPY_AND_ASSIGN(PictureLayer);
};
« no previous file with comments | « no previous file | cc/layers/picture_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698