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

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 181063022: cc: Trigger GPU rasterization based on a per-layer hint (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 1681 matching lines...) Expand 10 before | Expand all | Expand 10 after
1692 client_->SetNeedsRedrawOnImplThread(); 1692 client_->SetNeedsRedrawOnImplThread();
1693 } 1693 }
1694 1694
1695 ManagedMemoryPolicy LayerTreeHostImpl::ActualManagedMemoryPolicy() const { 1695 ManagedMemoryPolicy LayerTreeHostImpl::ActualManagedMemoryPolicy() const {
1696 ManagedMemoryPolicy actual = cached_managed_memory_policy_; 1696 ManagedMemoryPolicy actual = cached_managed_memory_policy_;
1697 // TODO(ernstm): The second condition disables pre-painting for all layers 1697 // TODO(ernstm): The second condition disables pre-painting for all layers
1698 // when GPU rasterization is enabled. Once we selectively enable GPU 1698 // when GPU rasterization is enabled. Once we selectively enable GPU
1699 // rasterization per layer, we also need to disable pre-painting selectively: 1699 // rasterization per layer, we also need to disable pre-painting selectively:
1700 // crbug.com/335387 1700 // crbug.com/335387
1701 if (debug_state_.rasterize_only_visible_content || 1701 if (debug_state_.rasterize_only_visible_content ||
1702 settings_.gpu_rasterization) { 1702 settings_.gpu_rasterization_state !=
1703 LayerTreeSettings::SoftwareRasterization) {
1703 actual.priority_cutoff_when_visible = 1704 actual.priority_cutoff_when_visible =
1704 gpu::MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY; 1705 gpu::MemoryAllocation::CUTOFF_ALLOW_REQUIRED_ONLY;
1705 } 1706 }
1706 1707
1707 if (zero_budget_) { 1708 if (zero_budget_) {
1708 actual.bytes_limit_when_visible = 0; 1709 actual.bytes_limit_when_visible = 0;
1709 } 1710 }
1710 1711
1711 return actual; 1712 return actual;
1712 } 1713 }
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
3023 swap_promise_monitor_.erase(monitor); 3024 swap_promise_monitor_.erase(monitor);
3024 } 3025 }
3025 3026
3026 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() { 3027 void LayerTreeHostImpl::NotifySwapPromiseMonitorsOfSetNeedsRedraw() {
3027 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin(); 3028 std::set<SwapPromiseMonitor*>::iterator it = swap_promise_monitor_.begin();
3028 for (; it != swap_promise_monitor_.end(); it++) 3029 for (; it != swap_promise_monitor_.end(); it++)
3029 (*it)->OnSetNeedsRedrawOnImpl(); 3030 (*it)->OnSetNeedsRedrawOnImpl();
3030 } 3031 }
3031 3032
3032 } // namespace cc 3033 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698