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

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

Issue 11617016: Componentize webkit/compositor_bindings target (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add ui dep to cc_test_support Created 8 years 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 "web_content_layer_impl.h" 5 #include "web_content_layer_impl.h"
6 6
7 #include "SkMatrix44.h" 7 #include "SkMatrix44.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "cc/content_layer.h" 9 #include "cc/content_layer.h"
10 #include "cc/picture_layer.h" 10 #include "cc/picture_layer.h"
11 #include "cc/switches.h" 11 #include "cc/switches.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayerClie nt.h" 12 #include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayerClie nt.h"
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h" 13 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h"
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h" 14 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h"
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h" 15 #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h" 16 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.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 CommandLine::ForCurrentProcess()->HasSwitch(cc::switches::kEnableImpl SidePainting);
25 } 25 }
26 26
27 WebContentLayer* WebContentLayer::create(WebContentLayerClient* client)
28 {
29 return new WebContentLayerImpl(client);
30 }
31
32 WebContentLayerImpl::WebContentLayerImpl(WebContentLayerClient* client) 27 WebContentLayerImpl::WebContentLayerImpl(WebContentLayerClient* client)
33 : m_client(client) 28 : m_client(client)
34 { 29 {
35 if (usingPictureLayer()) 30 if (usingPictureLayer())
36 m_layer = make_scoped_ptr(new WebLayerImpl(PictureLayer::create(this))); 31 m_layer = make_scoped_ptr(new WebLayerImpl(PictureLayer::create(this)));
37 else 32 else
38 m_layer = make_scoped_ptr(new WebLayerImpl(ContentLayer::create(this))); 33 m_layer = make_scoped_ptr(new WebLayerImpl(ContentLayer::create(this)));
39 m_layer->layer()->setIsDrawable(true); 34 m_layer->layer()->setIsDrawable(true);
40 } 35 }
41 36
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 85
91 bool useLCDText = usingPictureLayer() ? 86 bool useLCDText = usingPictureLayer() ?
92 false : 87 false :
93 static_cast<ContentLayer*>(m_layer->layer())->useLCDText(); 88 static_cast<ContentLayer*>(m_layer->layer())->useLCDText();
94 WebFloatRect webOpaque; 89 WebFloatRect webOpaque;
95 m_client->paintContents(canvas, clip, useLCDText, webOpaque); 90 m_client->paintContents(canvas, clip, useLCDText, webOpaque);
96 opaque = webOpaque; 91 opaque = webOpaque;
97 } 92 }
98 93
99 } // namespace WebKit 94 } // namespace WebKit
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/web_content_layer_impl.h ('k') | webkit/compositor_bindings/web_delegated_renderer_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698