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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
244 gfx::Rect geometry_rect = iter.geometry_rect(); | 244 gfx::Rect geometry_rect = iter.geometry_rect(); |
245 gfx::Rect visible_geometry_rect = | 245 gfx::Rect visible_geometry_rect = |
246 quad_sink->UnoccludedContentRect(geometry_rect, draw_transform()); | 246 quad_sink->UnoccludedContentRect(geometry_rect, draw_transform()); |
247 if (visible_geometry_rect.IsEmpty()) | 247 if (visible_geometry_rect.IsEmpty()) |
248 continue; | 248 continue; |
249 | 249 |
250 append_quads_data->visible_content_area += | 250 append_quads_data->visible_content_area += |
251 visible_geometry_rect.width() * visible_geometry_rect.height(); | 251 visible_geometry_rect.width() * visible_geometry_rect.height(); |
252 | 252 |
253 if (!*iter || !iter->IsReadyToDraw()) { | 253 if (!*iter || !iter->IsReadyToDraw()) { |
254 TRACE_EVENT_INSTANT0("cc", | |
danakj
2014/05/09 19:20:14
This could potentially happen an awful lot during
vmpstr
2014/05/09 19:29:04
Makes sense. Done.
| |
255 "PictureLayerImpl::AppendQuads checkerboard", | |
256 TRACE_EVENT_SCOPE_THREAD); | |
257 | |
254 if (draw_checkerboard_for_missing_tiles()) { | 258 if (draw_checkerboard_for_missing_tiles()) { |
255 scoped_ptr<CheckerboardDrawQuad> quad = CheckerboardDrawQuad::Create(); | 259 scoped_ptr<CheckerboardDrawQuad> quad = CheckerboardDrawQuad::Create(); |
256 SkColor color = DebugColors::DefaultCheckerboardColor(); | 260 SkColor color = DebugColors::DefaultCheckerboardColor(); |
257 quad->SetNew( | 261 quad->SetNew( |
258 shared_quad_state, geometry_rect, visible_geometry_rect, color); | 262 shared_quad_state, geometry_rect, visible_geometry_rect, color); |
259 quad_sink->Append(quad.PassAs<DrawQuad>()); | 263 quad_sink->Append(quad.PassAs<DrawQuad>()); |
260 } else { | 264 } else { |
261 SkColor color = SafeOpaqueBackgroundColor(); | 265 SkColor color = SafeOpaqueBackgroundColor(); |
262 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); | 266 scoped_ptr<SolidColorDrawQuad> quad = SolidColorDrawQuad::Create(); |
263 quad->SetNew(shared_quad_state, | 267 quad->SetNew(shared_quad_state, |
(...skipping 1302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1566 return iterator_index_ < iterators_.size(); | 1570 return iterator_index_ < iterators_.size(); |
1567 } | 1571 } |
1568 | 1572 |
1569 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( | 1573 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( |
1570 PictureLayerTiling::TilingEvictionTileIterator* it) const { | 1574 PictureLayerTiling::TilingEvictionTileIterator* it) const { |
1571 return it->get_type() == iteration_stage_ && | 1575 return it->get_type() == iteration_stage_ && |
1572 (**it)->required_for_activation() == required_for_activation_; | 1576 (**it)->required_for_activation() == required_for_activation_; |
1573 } | 1577 } |
1574 | 1578 |
1575 } // namespace cc | 1579 } // namespace cc |
OLD | NEW |