| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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) |
| OLD | NEW |