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

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

Issue 706203003: Update from https://crrev.com/303153 (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_base.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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 DCHECK(found_tile_for_recorded_picture); 531 DCHECK(found_tile_for_recorded_picture);
532 } 532 }
533 533
534 has_any_recordings_ = true; 534 has_any_recordings_ = true;
535 DCHECK(CanRasterSlowTileCheck(recorded_viewport_)); 535 DCHECK(CanRasterSlowTileCheck(recorded_viewport_));
536 return true; 536 return true;
537 } 537 }
538 538
539 void PicturePile::SetEmptyBounds() { 539 void PicturePile::SetEmptyBounds() {
540 tiling_.SetTilingSize(gfx::Size()); 540 tiling_.SetTilingSize(gfx::Size());
541 picture_map_.clear(); 541 Clear();
542 has_any_recordings_ = false;
543 recorded_viewport_ = gfx::Rect();
544 } 542 }
545 543
546 void PicturePile::DetermineIfSolidColor() { 544 void PicturePile::DetermineIfSolidColor() {
547 is_solid_color_ = false; 545 is_solid_color_ = false;
548 solid_color_ = SK_ColorTRANSPARENT; 546 solid_color_ = SK_ColorTRANSPARENT;
549 547
550 if (picture_map_.empty()) { 548 if (picture_map_.empty()) {
551 return; 549 return;
552 } 550 }
553 551
(...skipping 15 matching lines...) Expand all
569 return; 567 return;
570 } 568 }
571 skia::AnalysisCanvas canvas(recorded_viewport_.width(), 569 skia::AnalysisCanvas canvas(recorded_viewport_.width(),
572 recorded_viewport_.height()); 570 recorded_viewport_.height());
573 canvas.translate(-recorded_viewport_.x(), -recorded_viewport_.y()); 571 canvas.translate(-recorded_viewport_.x(), -recorded_viewport_.y());
574 picture->Raster(&canvas, nullptr, Region(), 1.0f); 572 picture->Raster(&canvas, nullptr, Region(), 1.0f);
575 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_); 573 is_solid_color_ = canvas.GetColorIfSolid(&solid_color_);
576 } 574 }
577 575
578 } // namespace cc 576 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/one_copy_raster_worker_pool.cc ('k') | cc/resources/picture_pile_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698