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

Side by Side Diff: cc/tiled_layer.cc

Issue 11519018: [cc] Make LayerImpls point at LayerTreeImpl instead of LTHI (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 "cc/tiled_layer.h" 5 #include "cc/tiled_layer.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "cc/layer_impl.h" 9 #include "cc/layer_impl.h"
10 #include "cc/layer_tree_host.h" 10 #include "cc/layer_tree_host.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 , m_failedUpdate(false) 88 , m_failedUpdate(false)
89 , m_tilingOption(AutoTile) 89 , m_tilingOption(AutoTile)
90 { 90 {
91 m_tiler = LayerTilingData::create(gfx::Size(), LayerTilingData::HasBorderTex els); 91 m_tiler = LayerTilingData::create(gfx::Size(), LayerTilingData::HasBorderTex els);
92 } 92 }
93 93
94 TiledLayer::~TiledLayer() 94 TiledLayer::~TiledLayer()
95 { 95 {
96 } 96 }
97 97
98 scoped_ptr<LayerImpl> TiledLayer::createLayerImpl(LayerTreeHostImpl* hostImpl) 98 scoped_ptr<LayerImpl> TiledLayer::createLayerImpl(LayerTreeImpl* treeImpl)
99 { 99 {
100 return TiledLayerImpl::create(hostImpl, id()).PassAs<LayerImpl>(); 100 return TiledLayerImpl::create(treeImpl, id()).PassAs<LayerImpl>();
101 } 101 }
102 102
103 void TiledLayer::updateTileSizeAndTilingOption() 103 void TiledLayer::updateTileSizeAndTilingOption()
104 { 104 {
105 DCHECK(layerTreeHost()); 105 DCHECK(layerTreeHost());
106 106
107 gfx::Size defaultTileSize = layerTreeHost()->settings().defaultTileSize; 107 gfx::Size defaultTileSize = layerTreeHost()->settings().defaultTileSize;
108 gfx::Size maxUntiledLayerSize = layerTreeHost()->settings().maxUntiledLayerS ize; 108 gfx::Size maxUntiledLayerSize = layerTreeHost()->settings().maxUntiledLayerS ize;
109 int layerWidth = contentBounds().width(); 109 int layerWidth = contentBounds().width();
110 int layerHeight = contentBounds().height(); 110 int layerHeight = contentBounds().height();
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 gfx::Rect prepaintRect = visibleContentRect(); 757 gfx::Rect prepaintRect = visibleContentRect();
758 prepaintRect.Inset(-m_tiler->tileSize().width() * prepaintColumns, 758 prepaintRect.Inset(-m_tiler->tileSize().width() * prepaintColumns,
759 -m_tiler->tileSize().height() * prepaintRows); 759 -m_tiler->tileSize().height() * prepaintRows);
760 gfx::Rect contentRect(gfx::Point(), contentBounds()); 760 gfx::Rect contentRect(gfx::Point(), contentBounds());
761 prepaintRect.Intersect(contentRect); 761 prepaintRect.Intersect(contentRect);
762 762
763 return prepaintRect; 763 return prepaintRect;
764 } 764 }
765 765
766 } // namespace cc 766 } // namespace cc
OLDNEW
« cc/layer.h ('K') | « cc/tiled_layer.h ('k') | cc/tiled_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698