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

Unified Diff: cc/trees/layer_tree_host_impl.h

Issue 2278283003: Refactor client visibility handling (Closed)
Patch Set: more fixes 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 | « cc/test/test_in_process_context_provider.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.h
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index 442949bdcd6eed9591550ddf596bf4eef2360289..420fb9eadb69f38eb19dd30f84a30133b5a1bd16 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -27,6 +27,7 @@
#include "cc/layers/layer_collections.h"
#include "cc/layers/render_pass_sink.h"
#include "cc/output/begin_frame_args.h"
+#include "cc/output/context_cache_controller.h"
#include "cc/output/delegating_renderer.h"
#include "cc/output/managed_memory_policy.h"
#include "cc/output/output_surface_client.h"
@@ -713,6 +714,9 @@ class CC_EXPORT LayerTreeHostImpl
bool ScrollAnimationUpdateTarget(ScrollNode* scroll_node,
const gfx::Vector2dF& scroll_delta);
+ void SetCompositorContextVisibility(bool is_visible);
+ void SetWorkerContextVisibility(bool is_visible);
+
using UIResourceMap = std::unordered_map<UIResourceId, UIResourceData>;
UIResourceMap ui_resource_map_;
@@ -723,6 +727,14 @@ class CC_EXPORT LayerTreeHostImpl
OutputSurface* output_surface_;
+ // The following scoped variables must not outlive the |output_surface_|.
+ // These should be transfered to ContextCacheController's
+ // ClientBecameNotVisible() before the output surface is destroyed.
+ std::unique_ptr<ContextCacheController::ScopedVisibility>
+ compositor_context_visibility_;
+ std::unique_ptr<ContextCacheController::ScopedVisibility>
+ worker_context_visibility_;
+
std::unique_ptr<ResourceProvider> resource_provider_;
bool need_update_gpu_rasterization_status_;
bool content_is_suitable_for_gpu_rasterization_;
« no previous file with comments | « cc/test/test_in_process_context_provider.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698