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

Unified Diff: webkit/renderer/compositor_bindings/web_layer_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: Fix nits 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/renderer/compositor_bindings/web_layer_impl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/renderer/compositor_bindings/web_layer_impl.cc
diff --git a/webkit/renderer/compositor_bindings/web_layer_impl.cc b/webkit/renderer/compositor_bindings/web_layer_impl.cc
index 0cac5f9c69dc302985b7258e8f534b14a24438d0..cd35d92091a0fe31e173c3f022f9490d7b385c98 100644
--- a/webkit/renderer/compositor_bindings/web_layer_impl.cc
+++ b/webkit/renderer/compositor_bindings/web_layer_impl.cc
@@ -41,14 +41,7 @@ using blink::WebFilterOperations;
namespace webkit {
namespace {
-struct ImplSidePaintingStatus {
- ImplSidePaintingStatus()
- : enabled(cc::switches::IsImplSidePaintingEnabled()) {
- }
- bool enabled;
-};
-base::LazyInstance<ImplSidePaintingStatus> g_impl_side_painting_status =
- LAZY_INSTANCE_INITIALIZER;
+bool g_impl_side_painting_enabled = false;
} // namespace
@@ -70,7 +63,12 @@ WebLayerImpl::~WebLayerImpl() {
// static
bool WebLayerImpl::UsingPictureLayer() {
- return g_impl_side_painting_status.Get().enabled;
+ return g_impl_side_painting_enabled;
+}
+
+// static
+void WebLayerImpl::SetImplSidePaintingEnabled(bool enabled) {
+ g_impl_side_painting_enabled = enabled;
}
int WebLayerImpl::id() const { return layer_->id(); }
@@ -211,6 +209,10 @@ void WebLayerImpl::setBackgroundFilters(const WebFilterOperations& filters) {
layer_->SetBackgroundFilters(filters_impl.AsFilterOperations());
}
+void WebLayerImpl::setHasGpuRasterizationHint(bool has_hint) {
+ layer_->SetHasGpuRasterizationHint(has_hint);
+}
+
void WebLayerImpl::setAnimationDelegate(
blink::WebAnimationDelegate* delegate) {
animation_delegate_adapter_.reset(
« no previous file with comments | « webkit/renderer/compositor_bindings/web_layer_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698