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/resources/picture.h" | 5 #include "cc/resources/picture.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 continue; | 454 continue; |
455 | 455 |
456 // We found a non-empty list: store it and get the first pixel ref. | 456 // We found a non-empty list: store it and get the first pixel ref. |
457 current_pixel_refs_ = &iter->second; | 457 current_pixel_refs_ = &iter->second; |
458 current_index_ = 0; | 458 current_index_ = 0; |
459 break; | 459 break; |
460 } | 460 } |
461 return *this; | 461 return *this; |
462 } | 462 } |
463 | 463 |
464 scoped_refptr<base::debug::ConvertableToTraceFormat> | 464 scoped_refptr<base::trace_event::ConvertableToTraceFormat> |
465 Picture::AsTraceableRasterData(float scale) const { | 465 Picture::AsTraceableRasterData(float scale) const { |
466 scoped_refptr<base::debug::TracedValue> raster_data = | 466 scoped_refptr<base::trace_event::TracedValue> raster_data = |
467 new base::debug::TracedValue(); | 467 new base::trace_event::TracedValue(); |
468 TracedValue::SetIDRef(this, raster_data.get(), "picture_id"); | 468 TracedValue::SetIDRef(this, raster_data.get(), "picture_id"); |
469 raster_data->SetDouble("scale", scale); | 469 raster_data->SetDouble("scale", scale); |
470 return raster_data; | 470 return raster_data; |
471 } | 471 } |
472 | 472 |
473 scoped_refptr<base::debug::ConvertableToTraceFormat> | 473 scoped_refptr<base::trace_event::ConvertableToTraceFormat> |
474 Picture::AsTraceableRecordData() const { | 474 Picture::AsTraceableRecordData() const { |
475 scoped_refptr<base::debug::TracedValue> record_data = | 475 scoped_refptr<base::trace_event::TracedValue> record_data = |
476 new base::debug::TracedValue(); | 476 new base::trace_event::TracedValue(); |
477 TracedValue::SetIDRef(this, record_data.get(), "picture_id"); | 477 TracedValue::SetIDRef(this, record_data.get(), "picture_id"); |
478 MathUtil::AddToTracedValue("layer_rect", layer_rect_, record_data.get()); | 478 MathUtil::AddToTracedValue("layer_rect", layer_rect_, record_data.get()); |
479 return record_data; | 479 return record_data; |
480 } | 480 } |
481 | 481 |
482 } // namespace cc | 482 } // namespace cc |
OLD | NEW |