Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(936)

Side by Side Diff: cc/resources/picture.cc

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/resources/picture.h ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « cc/resources/picture.h ('k') | cc/resources/picture_layer_tiling.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698