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

Side by Side Diff: webkit/compositor_bindings/web_content_layer_impl.cc

Issue 12221005: Add flag to disable impl-side painting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 7 years, 10 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
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 "webkit/compositor_bindings/web_content_layer_impl.h" 5 #include "webkit/compositor_bindings/web_content_layer_impl.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "cc/content_layer.h" 8 #include "cc/content_layer.h"
9 #include "cc/picture_layer.h" 9 #include "cc/picture_layer.h"
10 #include "cc/switches.h" 10 #include "cc/switches.h"
11 #include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayerClie nt.h" 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayerClie nt.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h" 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h"
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h" 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h"
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
16 #include "third_party/skia/include/utils/SkMatrix44.h" 16 #include "third_party/skia/include/utils/SkMatrix44.h"
17 17
18 using namespace cc; 18 using namespace cc;
19 19
20 namespace WebKit { 20 namespace WebKit {
21 21
22 static bool usingPictureLayer() 22 static bool usingPictureLayer()
23 { 23 {
24 return CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kEnableImpl SidePainting); 24 return cc::switches::IsImplSidePaintingEnabled();
25 } 25 }
26 26
27 WebContentLayerImpl::WebContentLayerImpl(WebContentLayerClient* client) 27 WebContentLayerImpl::WebContentLayerImpl(WebContentLayerClient* client)
28 : m_client(client) 28 : m_client(client)
29 { 29 {
30 if (usingPictureLayer()) 30 if (usingPictureLayer())
31 m_layer = make_scoped_ptr(new WebLayerImpl(PictureLayer::create(this))); 31 m_layer = make_scoped_ptr(new WebLayerImpl(PictureLayer::create(this)));
32 else 32 else
33 m_layer = make_scoped_ptr(new WebLayerImpl(ContentLayer::create(this))); 33 m_layer = make_scoped_ptr(new WebLayerImpl(ContentLayer::create(this)));
34 m_layer->layer()->setIsDrawable(true); 34 m_layer->layer()->setIsDrawable(true);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 { 82 {
83 if (!m_client) 83 if (!m_client)
84 return; 84 return;
85 85
86 WebFloatRect webOpaque; 86 WebFloatRect webOpaque;
87 m_client->paintContents(canvas, clip, m_layer->layer()->canUseLCDText(), web Opaque); 87 m_client->paintContents(canvas, clip, m_layer->layer()->canUseLCDText(), web Opaque);
88 opaque = webOpaque; 88 opaque = webOpaque;
89 } 89 }
90 90
91 } // namespace WebKit 91 } // namespace WebKit
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | webkit/compositor_bindings/web_image_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698