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

Side by Side Diff: webkit/compositor_bindings/WebContentLayerImpl.cpp

Issue 11192050: Rename compositor bindings filenames to Chromium style (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "WebContentLayerImpl.h"
7
8 #include "SkMatrix44.h"
9 #include "cc/content_layer.h"
10 #include "cc/stubs/float_rect.h"
11 #include "cc/stubs/int_rect.h"
12 #include "third_party/WebKit/Source/Platform/chromium/public/WebContentLayerClie nt.h"
13 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatPoint.h"
14 #include "third_party/WebKit/Source/Platform/chromium/public/WebFloatRect.h"
15 #include "third_party/WebKit/Source/Platform/chromium/public/WebRect.h"
16 #include "third_party/WebKit/Source/Platform/chromium/public/WebSize.h"
17 #include "webcore_convert.h"
18
19 using namespace cc;
20
21 namespace WebKit {
22
23 WebContentLayer* WebContentLayer::create(WebContentLayerClient* client)
24 {
25 return new WebContentLayerImpl(client);
26 }
27
28 WebContentLayerImpl::WebContentLayerImpl(WebContentLayerClient* client)
29 : m_layer(new WebLayerImpl(ContentLayerChromium::create(this)))
30 , m_client(client)
31 {
32 m_layer->layer()->setIsDrawable(true);
33 }
34
35 WebContentLayerImpl::~WebContentLayerImpl()
36 {
37 static_cast<ContentLayerChromium*>(m_layer->layer())->clearClient();
38 }
39
40 WebLayer* WebContentLayerImpl::layer()
41 {
42 return m_layer.get();
43 }
44
45 void WebContentLayerImpl::setDoubleSided(bool doubleSided)
46 {
47 m_layer->layer()->setDoubleSided(doubleSided);
48 }
49
50 void WebContentLayerImpl::setBoundsContainPageScale(bool boundsContainPageScale)
51 {
52 return m_layer->layer()->setBoundsContainPageScale(boundsContainPageScale);
53 }
54
55 bool WebContentLayerImpl::boundsContainPageScale() const
56 {
57 return m_layer->layer()->boundsContainPageScale();
58 }
59
60 void WebContentLayerImpl::setUseLCDText(bool enable)
61 {
62 m_layer->layer()->setUseLCDText(enable);
63 }
64
65 void WebContentLayerImpl::setDrawCheckerboardForMissingTiles(bool enable)
66 {
67 m_layer->layer()->setDrawCheckerboardForMissingTiles(enable);
68 }
69
70
71 void WebContentLayerImpl::paintContents(SkCanvas* canvas, const IntRect& clip, F loatRect& opaque)
72 {
73 if (!m_client)
74 return;
75 WebFloatRect webOpaque;
76 m_client->paintContents(canvas, convert(clip), webOpaque);
77 opaque = convert(webOpaque);
78 }
79
80 } // namespace WebKit
OLDNEW
« no previous file with comments | « webkit/compositor_bindings/WebContentLayerImpl.h ('k') | webkit/compositor_bindings/WebDelegatedRendererLayerImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698