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 "cc/layers/tiled_layer.h" | 5 #include "cc/layers/tiled_layer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 occluded(false), | 79 occluded(false), |
80 updater_resource_(updater_resource.Pass()) {} | 80 updater_resource_(updater_resource.Pass()) {} |
81 | 81 |
82 scoped_ptr<LayerUpdater::Resource> updater_resource_; | 82 scoped_ptr<LayerUpdater::Resource> updater_resource_; |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(UpdatableTile); | 84 DISALLOW_COPY_AND_ASSIGN(UpdatableTile); |
85 }; | 85 }; |
86 | 86 |
87 TiledLayer::TiledLayer() | 87 TiledLayer::TiledLayer() |
88 : ContentsScalingLayer(), | 88 : ContentsScalingLayer(), |
89 texture_format_(GL_INVALID_ENUM), | 89 texture_format_(RGBA_8888), |
90 skips_draw_(false), | 90 skips_draw_(false), |
91 failed_update_(false), | 91 failed_update_(false), |
92 tiling_option_(AUTO_TILE) { | 92 tiling_option_(AUTO_TILE) { |
93 tiler_ = | 93 tiler_ = |
94 LayerTilingData::Create(gfx::Size(), LayerTilingData::HAS_BORDER_TEXELS); | 94 LayerTilingData::Create(gfx::Size(), LayerTilingData::HAS_BORDER_TEXELS); |
95 } | 95 } |
96 | 96 |
97 TiledLayer::~TiledLayer() {} | 97 TiledLayer::~TiledLayer() {} |
98 | 98 |
99 scoped_ptr<LayerImpl> TiledLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) { | 99 scoped_ptr<LayerImpl> TiledLayer::CreateLayerImpl(LayerTreeImpl* tree_impl) { |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 gfx::Rect prepaint_rect = visible_content_rect(); | 894 gfx::Rect prepaint_rect = visible_content_rect(); |
895 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns, | 895 prepaint_rect.Inset(-tiler_->tile_size().width() * kPrepaintColumns, |
896 -tiler_->tile_size().height() * kPrepaintRows); | 896 -tiler_->tile_size().height() * kPrepaintRows); |
897 gfx::Rect content_rect(content_bounds()); | 897 gfx::Rect content_rect(content_bounds()); |
898 prepaint_rect.Intersect(content_rect); | 898 prepaint_rect.Intersect(content_rect); |
899 | 899 |
900 return prepaint_rect; | 900 return prepaint_rect; |
901 } | 901 } |
902 | 902 |
903 } // namespace cc | 903 } // namespace cc |
OLD | NEW |