OLD | NEW |
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/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 draw_properties().is_clipped, | 158 draw_properties().is_clipped, |
159 draw_properties().opacity, | 159 draw_properties().opacity, |
160 blend_mode(), | 160 blend_mode(), |
161 sorting_context_id_); | 161 sorting_context_id_); |
162 | 162 |
163 gfx::Rect rect = scaled_visible_content_rect; | 163 gfx::Rect rect = scaled_visible_content_rect; |
164 | 164 |
165 if (current_draw_mode_ == DRAW_MODE_RESOURCELESS_SOFTWARE) { | 165 if (current_draw_mode_ == DRAW_MODE_RESOURCELESS_SOFTWARE) { |
166 AppendDebugBorderQuad( | 166 AppendDebugBorderQuad( |
167 quad_sink, | 167 quad_sink, |
| 168 scaled_content_bounds, |
168 shared_quad_state, | 169 shared_quad_state, |
169 append_quads_data, | 170 append_quads_data, |
170 DebugColors::DirectPictureBorderColor(), | 171 DebugColors::DirectPictureBorderColor(), |
171 DebugColors::DirectPictureBorderWidth(layer_tree_impl())); | 172 DebugColors::DirectPictureBorderWidth(layer_tree_impl())); |
172 | 173 |
173 gfx::Rect geometry_rect = rect; | 174 gfx::Rect geometry_rect = rect; |
174 gfx::Rect opaque_rect = contents_opaque() ? geometry_rect : gfx::Rect(); | 175 gfx::Rect opaque_rect = contents_opaque() ? geometry_rect : gfx::Rect(); |
175 gfx::Rect visible_geometry_rect = | 176 gfx::Rect visible_geometry_rect = |
176 quad_sink->UnoccludedContentRect(geometry_rect, draw_transform()); | 177 quad_sink->UnoccludedContentRect(geometry_rect, draw_transform()); |
177 if (visible_geometry_rect.IsEmpty()) | 178 if (visible_geometry_rect.IsEmpty()) |
(...skipping 12 matching lines...) Expand all Loading... |
190 texture_size, | 191 texture_size, |
191 RGBA_8888, | 192 RGBA_8888, |
192 quad_content_rect, | 193 quad_content_rect, |
193 max_contents_scale, | 194 max_contents_scale, |
194 pile_); | 195 pile_); |
195 quad_sink->Append(quad.PassAs<DrawQuad>()); | 196 quad_sink->Append(quad.PassAs<DrawQuad>()); |
196 append_quads_data->num_missing_tiles++; | 197 append_quads_data->num_missing_tiles++; |
197 return; | 198 return; |
198 } | 199 } |
199 | 200 |
200 AppendDebugBorderQuad(quad_sink, shared_quad_state, append_quads_data); | 201 AppendDebugBorderQuad( |
| 202 quad_sink, scaled_content_bounds, shared_quad_state, append_quads_data); |
201 | 203 |
202 if (ShowDebugBorders()) { | 204 if (ShowDebugBorders()) { |
203 for (PictureLayerTilingSet::CoverageIterator iter( | 205 for (PictureLayerTilingSet::CoverageIterator iter( |
204 tilings_.get(), max_contents_scale, rect, ideal_contents_scale_); | 206 tilings_.get(), max_contents_scale, rect, ideal_contents_scale_); |
205 iter; | 207 iter; |
206 ++iter) { | 208 ++iter) { |
207 SkColor color; | 209 SkColor color; |
208 float width; | 210 float width; |
209 if (*iter && iter->IsReadyToDraw()) { | 211 if (*iter && iter->IsReadyToDraw()) { |
210 ManagedTileState::TileVersion::Mode mode = | 212 ManagedTileState::TileVersion::Mode mode = |
(...skipping 1402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1613 return iterator_index_ < iterators_.size(); | 1615 return iterator_index_ < iterators_.size(); |
1614 } | 1616 } |
1615 | 1617 |
1616 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( | 1618 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( |
1617 PictureLayerTiling::TilingEvictionTileIterator* it) const { | 1619 PictureLayerTiling::TilingEvictionTileIterator* it) const { |
1618 return it->get_type() == iteration_stage_ && | 1620 return it->get_type() == iteration_stage_ && |
1619 (**it)->required_for_activation() == required_for_activation_; | 1621 (**it)->required_for_activation() == required_for_activation_; |
1620 } | 1622 } |
1621 | 1623 |
1622 } // namespace cc | 1624 } // namespace cc |
OLD | NEW |