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

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

Issue 1361663003: Revert of Cache gpu suitability in DisplayItemList, remove SetUnsuitable...ForTesting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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/playback/picture_pile.h ('k') | cc/playback/recording_source.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/playback/picture_pile.h" 5 #include "cc/playback/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 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 return is_suitable_for_gpu_rasterization_; 605 return is_suitable_for_gpu_rasterization_;
606 } 606 }
607 607
608 void PicturePile::SetTileGridSize(const gfx::Size& tile_grid_size) { 608 void PicturePile::SetTileGridSize(const gfx::Size& tile_grid_size) {
609 DCHECK_GT(tile_grid_size.width(), 0); 609 DCHECK_GT(tile_grid_size.width(), 0);
610 DCHECK_GT(tile_grid_size.height(), 0); 610 DCHECK_GT(tile_grid_size.height(), 0);
611 611
612 tile_grid_size_ = tile_grid_size; 612 tile_grid_size_ = tile_grid_size;
613 } 613 }
614 614
615 void PicturePile::SetUnsuitableForGpuRasterizationForTesting() {
616 is_suitable_for_gpu_rasterization_ = false;
617 }
618
615 bool PicturePile::CanRasterSlowTileCheck(const gfx::Rect& layer_rect) const { 619 bool PicturePile::CanRasterSlowTileCheck(const gfx::Rect& layer_rect) const {
616 bool include_borders = false; 620 bool include_borders = false;
617 for (TilingData::Iterator tile_iter(&tiling_, layer_rect, include_borders); 621 for (TilingData::Iterator tile_iter(&tiling_, layer_rect, include_borders);
618 tile_iter; ++tile_iter) { 622 tile_iter; ++tile_iter) {
619 PictureMap::const_iterator map_iter = picture_map_.find(tile_iter.index()); 623 PictureMap::const_iterator map_iter = picture_map_.find(tile_iter.index());
620 if (map_iter == picture_map_.end()) 624 if (map_iter == picture_map_.end())
621 return false; 625 return false;
622 } 626 }
623 return true; 627 return true;
624 } 628 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 681
678 void PicturePile::SetBufferPixels(int new_buffer_pixels) { 682 void PicturePile::SetBufferPixels(int new_buffer_pixels) {
679 if (new_buffer_pixels == buffer_pixels()) 683 if (new_buffer_pixels == buffer_pixels())
680 return; 684 return;
681 685
682 Clear(); 686 Clear();
683 tiling_.SetBorderTexels(new_buffer_pixels); 687 tiling_.SetBorderTexels(new_buffer_pixels);
684 } 688 }
685 689
686 } // namespace cc 690 } // namespace cc
OLDNEW
« no previous file with comments | « cc/playback/picture_pile.h ('k') | cc/playback/recording_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698