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 <algorithm> | 5 #include <algorithm> |
6 #include <limits> | 6 #include <limits> |
7 #include <set> | 7 #include <set> |
8 | 8 |
9 #include "base/trace_event/trace_event.h" | 9 #include "base/trace_event/trace_event.h" |
10 #include "cc/base/region.h" | 10 #include "cc/base/region.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 } | 372 } |
373 | 373 |
374 void PicturePileImpl::SetRequiresClear(bool requires_clear) { | 374 void PicturePileImpl::SetRequiresClear(bool requires_clear) { |
375 requires_clear_ = requires_clear; | 375 requires_clear_ = requires_clear; |
376 } | 376 } |
377 | 377 |
378 bool PicturePileImpl::ShouldAttemptToUseDistanceFieldText() const { | 378 bool PicturePileImpl::ShouldAttemptToUseDistanceFieldText() const { |
379 return should_attempt_to_use_distance_field_text_; | 379 return should_attempt_to_use_distance_field_text_; |
380 } | 380 } |
381 | 381 |
382 void PicturePileImpl::AsValueInto(base::debug::TracedValue* pictures) const { | 382 void PicturePileImpl::AsValueInto( |
| 383 base::trace_event::TracedValue* pictures) const { |
383 gfx::Rect tiling_rect(tiling_.tiling_size()); | 384 gfx::Rect tiling_rect(tiling_.tiling_size()); |
384 std::set<const void*> appended_pictures; | 385 std::set<const void*> appended_pictures; |
385 bool include_borders = true; | 386 bool include_borders = true; |
386 for (TilingData::Iterator tile_iter(&tiling_, tiling_rect, include_borders); | 387 for (TilingData::Iterator tile_iter(&tiling_, tiling_rect, include_borders); |
387 tile_iter; ++tile_iter) { | 388 tile_iter; ++tile_iter) { |
388 PictureMap::const_iterator map_iter = picture_map_.find(tile_iter.index()); | 389 PictureMap::const_iterator map_iter = picture_map_.find(tile_iter.index()); |
389 if (map_iter == picture_map_.end()) | 390 if (map_iter == picture_map_.end()) |
390 continue; | 391 continue; |
391 | 392 |
392 const Picture* picture = map_iter->second.GetPicture(); | 393 const Picture* picture = map_iter->second.GetPicture(); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 ++it) { | 459 ++it) { |
459 const Picture* picture = it->second.GetPicture(); | 460 const Picture* picture = it->second.GetPicture(); |
460 if (picture && (processed_pictures.count(picture) == 0)) { | 461 if (picture && (processed_pictures.count(picture) == 0)) { |
461 picture->EmitTraceSnapshot(); | 462 picture->EmitTraceSnapshot(); |
462 processed_pictures.insert(picture); | 463 processed_pictures.insert(picture); |
463 } | 464 } |
464 } | 465 } |
465 } | 466 } |
466 | 467 |
467 } // namespace cc | 468 } // namespace cc |
OLD | NEW |