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

Side by Side Diff: cc/TiledLayerChromium.cpp

Issue 11099040: [cc] Store CCLayerImpls as scoped_ptrs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix cc unit tests 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
« no previous file with comments | « cc/TiledLayerChromium.h ('k') | cc/TreeSynchronizer.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 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 "config.h" 5 #include "config.h"
6 6
7 #if USE(ACCELERATED_COMPOSITING) 7 #if USE(ACCELERATED_COMPOSITING)
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "TiledLayerChromium.h" 10 #include "TiledLayerChromium.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 , m_sampledTexelFormat(LayerTextureUpdater::SampledTexelFormatInvalid) 87 , m_sampledTexelFormat(LayerTextureUpdater::SampledTexelFormatInvalid)
88 , m_tilingOption(AutoTile) 88 , m_tilingOption(AutoTile)
89 { 89 {
90 m_tiler = CCLayerTilingData::create(IntSize(), CCLayerTilingData::HasBorderT exels); 90 m_tiler = CCLayerTilingData::create(IntSize(), CCLayerTilingData::HasBorderT exels);
91 } 91 }
92 92
93 TiledLayerChromium::~TiledLayerChromium() 93 TiledLayerChromium::~TiledLayerChromium()
94 { 94 {
95 } 95 }
96 96
97 PassOwnPtr<CCLayerImpl> TiledLayerChromium::createCCLayerImpl() 97 scoped_ptr<CCLayerImpl> TiledLayerChromium::createCCLayerImpl()
98 { 98 {
99 return CCTiledLayerImpl::create(id()); 99 return CCTiledLayerImpl::create(id()).PassAs<CCLayerImpl>();
100 } 100 }
101 101
102 void TiledLayerChromium::updateTileSizeAndTilingOption() 102 void TiledLayerChromium::updateTileSizeAndTilingOption()
103 { 103 {
104 ASSERT(layerTreeHost()); 104 ASSERT(layerTreeHost());
105 105
106 const IntSize& defaultTileSize = layerTreeHost()->settings().defaultTileSize ; 106 const IntSize& defaultTileSize = layerTreeHost()->settings().defaultTileSize ;
107 const IntSize& maxUntiledLayerSize = layerTreeHost()->settings().maxUntiledL ayerSize; 107 const IntSize& maxUntiledLayerSize = layerTreeHost()->settings().maxUntiledL ayerSize;
108 int layerWidth = contentBounds().width(); 108 int layerWidth = contentBounds().width();
109 int layerHeight = contentBounds().height(); 109 int layerHeight = contentBounds().height();
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
811 prepaintRect.inflateX(m_tiler->tileSize().width()); 811 prepaintRect.inflateX(m_tiler->tileSize().width());
812 prepaintRect.inflateY(m_tiler->tileSize().height() * 2); 812 prepaintRect.inflateY(m_tiler->tileSize().height() * 2);
813 IntRect contentRect(IntPoint::zero(), contentBounds()); 813 IntRect contentRect(IntPoint::zero(), contentBounds());
814 prepaintRect.intersect(contentRect); 814 prepaintRect.intersect(contentRect);
815 815
816 return prepaintRect; 816 return prepaintRect;
817 } 817 }
818 818
819 } 819 }
820 #endif // USE(ACCELERATED_COMPOSITING) 820 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW
« no previous file with comments | « cc/TiledLayerChromium.h ('k') | cc/TreeSynchronizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698