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

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

Issue 683113005: Update from chromium https://crrev.com/302282 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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/one_copy_raster_worker_pool.cc ('k') | cc/resources/picture_pile_unittest.cc » ('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_pile.h" 5 #include "cc/resources/picture_pile.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 if (picture->ApproximateOpCount() > kOpCountThatIsOkToAnalyze) 563 if (picture->ApproximateOpCount() > kOpCountThatIsOkToAnalyze)
564 return; 564 return;
565 565
566 // Make sure all of the mapped images point to the same picture. 566 // Make sure all of the mapped images point to the same picture.
567 for (++it; it != picture_map_.end(); ++it) { 567 for (++it; it != picture_map_.end(); ++it) {
568 if (it->second.GetPicture() != picture) 568 if (it->second.GetPicture() != picture)
569 return; 569 return;
570 } 570 }
571 skia::AnalysisCanvas canvas(recorded_viewport_.width(), 571 skia::AnalysisCanvas canvas(recorded_viewport_.width(),
572 recorded_viewport_.height()); 572 recorded_viewport_.height());
573 picture->Raster(&canvas, NULL, Region(), 1.0f); 573 canvas.translate(-recorded_viewport_.x(), -recorded_viewport_.y());
574 picture->Raster(&canvas, nullptr, Region(), 1.0f);
574 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); 575 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_);
575 } 576 }
576 577
577 } // namespace cc 578 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/one_copy_raster_worker_pool.cc ('k') | cc/resources/picture_pile_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698