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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 270823003: cc: Move gpu rasterization flag from LayerImpl to LayerTreeImpl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 9797c974b27798cd7a65185f67220914cb8220ad..78bb4a604c18f7befc066a8299facfdd686a2c76 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -332,6 +332,13 @@ void LayerTreeHostImpl::CommitComplete() {
TRACE_EVENT0("cc", "LayerTreeHostImpl::CommitComplete");
if (settings_.impl_side_painting) {
+ if (pending_tree_->use_gpu_rasterization() !=
+ active_tree_->use_gpu_rasterization()) {
+ // We need to recreate tilings for all layers in the pending tree.
+ // The tile size and rasterization is different for sw and gpu rasterizer.
+ SendReleaseResourcesRecursive(pending_tree_->root_layer());
+ // TODO(alokp): Rip out rasterizer delegate and switch rasterizers here.
+ }
// Impl-side painting needs an update immediately post-commit to have the
// opportunity to create tilings. Other paths can call UpdateDrawProperties
// more lazily when needed prior to drawing.

Powered by Google App Engine
This is Rietveld 408576698