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

Unified Diff: webkit/renderer/compositor_bindings/web_layer_impl.cc

Issue 189883009: Define a --force-gpu-rasterization flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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
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..5f76315980eb98305a8c5429cce4edaba7c28a89 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(); }

Powered by Google App Engine
This is Rietveld 408576698