| 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/playback/picture.h" | 5 #include "cc/playback/picture.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/base64.h" | 10 #include "base/base64.h" |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 void Picture::GatherPixelRefs() { | 227 void Picture::GatherPixelRefs() { |
| 228 TRACE_EVENT2("cc", "Picture::GatherPixelRefs", | 228 TRACE_EVENT2("cc", "Picture::GatherPixelRefs", |
| 229 "width", layer_rect_.width(), | 229 "width", layer_rect_.width(), |
| 230 "height", layer_rect_.height()); | 230 "height", layer_rect_.height()); |
| 231 | 231 |
| 232 DCHECK(picture_); | 232 DCHECK(picture_); |
| 233 DCHECK(pixel_refs_.empty()); | 233 DCHECK(pixel_refs_.empty()); |
| 234 if (!WillPlayBackBitmaps()) | 234 if (!WillPlayBackBitmaps()) |
| 235 return; | 235 return; |
| 236 | 236 |
| 237 pixel_refs_.GatherPixelRefsFromPicture(picture_.get()); | 237 pixel_refs_.GatherPixelRefsFromPicture(picture_.get(), layer_rect_); |
| 238 } | 238 } |
| 239 | 239 |
| 240 int Picture::Raster(SkCanvas* canvas, | 240 int Picture::Raster(SkCanvas* canvas, |
| 241 SkPicture::AbortCallback* callback, | 241 SkPicture::AbortCallback* callback, |
| 242 const Region& negated_content_region, | 242 const Region& negated_content_region, |
| 243 float contents_scale) const { | 243 float contents_scale) const { |
| 244 TRACE_EVENT_BEGIN1( | 244 TRACE_EVENT_BEGIN1( |
| 245 "cc", | 245 "cc", |
| 246 "Picture::Raster", | 246 "Picture::Raster", |
| 247 "data", | 247 "data", |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 scoped_refptr<base::trace_event::ConvertableToTraceFormat> | 329 scoped_refptr<base::trace_event::ConvertableToTraceFormat> |
| 330 Picture::AsTraceableRecordData() const { | 330 Picture::AsTraceableRecordData() const { |
| 331 scoped_refptr<base::trace_event::TracedValue> record_data = | 331 scoped_refptr<base::trace_event::TracedValue> record_data = |
| 332 new base::trace_event::TracedValue(); | 332 new base::trace_event::TracedValue(); |
| 333 TracedValue::SetIDRef(this, record_data.get(), "picture_id"); | 333 TracedValue::SetIDRef(this, record_data.get(), "picture_id"); |
| 334 MathUtil::AddToTracedValue("layer_rect", layer_rect_, record_data.get()); | 334 MathUtil::AddToTracedValue("layer_rect", layer_rect_, record_data.get()); |
| 335 return record_data; | 335 return record_data; |
| 336 } | 336 } |
| 337 | 337 |
| 338 } // namespace cc | 338 } // namespace cc |
| OLD | NEW |