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

Side by Side Diff: cc/io_surface_layer.cc

Issue 11472021: cc: Pass LayerTreeHostImpl to LayerImpl constructor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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
« 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
(...skipping 12 matching lines...) Expand all
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() 33 scoped_ptr<LayerImpl> IOSurfaceLayer::createLayerImpl(LayerTreeHostImpl* hostImp l)
34 { 34 {
35 return IOSurfaceLayerImpl::create(m_layerId).PassAs<LayerImpl>(); 35 return IOSurfaceLayerImpl::create(hostImpl, m_layerId).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