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

Side by Side Diff: cc/io_surface_layer.cc

Issue 12774006: cc: Chromify Layer and LayerImpl classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: MoreAndroidCompilings Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/io_surface_layer.h ('k') | cc/io_surface_layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 "cc/io_surface_layer.h" 5 #include "cc/io_surface_layer.h"
6 6
7 #include "cc/io_surface_layer_impl.h" 7 #include "cc/io_surface_layer_impl.h"
8 8
9 namespace cc { 9 namespace cc {
10 10
11 scoped_refptr<IOSurfaceLayer> IOSurfaceLayer::create() 11 scoped_refptr<IOSurfaceLayer> IOSurfaceLayer::Create()
12 { 12 {
13 return make_scoped_refptr(new IOSurfaceLayer()); 13 return make_scoped_refptr(new IOSurfaceLayer());
14 } 14 }
15 15
16 IOSurfaceLayer::IOSurfaceLayer() 16 IOSurfaceLayer::IOSurfaceLayer()
17 : Layer() 17 : Layer()
18 , m_ioSurfaceId(0) 18 , m_ioSurfaceId(0)
19 { 19 {
20 } 20 }
21 21
22 IOSurfaceLayer::~IOSurfaceLayer() 22 IOSurfaceLayer::~IOSurfaceLayer()
23 { 23 {
24 } 24 }
25 25
26 void IOSurfaceLayer::setIOSurfaceProperties(uint32_t ioSurfaceId, const gfx::Siz e& size) 26 void IOSurfaceLayer::setIOSurfaceProperties(uint32_t ioSurfaceId, const gfx::Siz e& size)
27 { 27 {
28 m_ioSurfaceId = ioSurfaceId; 28 m_ioSurfaceId = ioSurfaceId;
29 m_ioSurfaceSize = size; 29 m_ioSurfaceSize = size;
30 setNeedsCommit(); 30 SetNeedsCommit();
31 } 31 }
32 32
33 scoped_ptr<LayerImpl> IOSurfaceLayer::createLayerImpl(LayerTreeImpl* treeImpl) 33 scoped_ptr<LayerImpl> IOSurfaceLayer::CreateLayerImpl(LayerTreeImpl* treeImpl)
34 { 34 {
35 return IOSurfaceLayerImpl::create(treeImpl, m_layerId).PassAs<LayerImpl>(); 35 return IOSurfaceLayerImpl::Create(treeImpl, layer_id_).PassAs<LayerImpl>();
36 } 36 }
37 37
38 bool IOSurfaceLayer::drawsContent() const 38 bool IOSurfaceLayer::DrawsContent() const
39 { 39 {
40 return m_ioSurfaceId && Layer::drawsContent(); 40 return m_ioSurfaceId && Layer::DrawsContent();
41 } 41 }
42 42
43 void IOSurfaceLayer::pushPropertiesTo(LayerImpl* layer) 43 void IOSurfaceLayer::PushPropertiesTo(LayerImpl* layer)
44 { 44 {
45 Layer::pushPropertiesTo(layer); 45 Layer::PushPropertiesTo(layer);
46 46
47 IOSurfaceLayerImpl* ioSurfaceLayer = static_cast<IOSurfaceLayerImpl*>(layer) ; 47 IOSurfaceLayerImpl* ioSurfaceLayer = static_cast<IOSurfaceLayerImpl*>(layer) ;
48 ioSurfaceLayer->setIOSurfaceProperties(m_ioSurfaceId, m_ioSurfaceSize); 48 ioSurfaceLayer->setIOSurfaceProperties(m_ioSurfaceId, m_ioSurfaceSize);
49 } 49 }
50 50
51 } // namespace cc 51 } // namespace cc
OLDNEW
« no previous file with comments | « cc/io_surface_layer.h ('k') | cc/io_surface_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698