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

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

Issue 12388095: cc: Merge GatherPixelRefs and AnalyzeInRect (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compiler errors Created 7 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « cc/resources/picture_pile_impl.cc ('k') | skia/ext/analysis_canvas.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/tile_manager.h" 5 #include "cc/resources/tile_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 tile->content_rect(), 714 tile->content_rect(),
715 tile->contents_scale(), 715 tile->contents_scale(),
716 &managed_tile_state.picture_pile_analysis); 716 &managed_tile_state.picture_pile_analysis);
717 managed_tile_state.picture_pile_analysis.is_cheap_to_raster &= 717 managed_tile_state.picture_pile_analysis.is_cheap_to_raster &=
718 use_cheapness_estimator_; 718 use_cheapness_estimator_;
719 managed_tile_state.picture_pile_analysis.is_solid_color &= 719 managed_tile_state.picture_pile_analysis.is_solid_color &=
720 use_color_estimator_; 720 use_color_estimator_;
721 managed_tile_state.picture_pile_analysis.is_transparent &= 721 managed_tile_state.picture_pile_analysis.is_transparent &=
722 use_color_estimator_; 722 use_color_estimator_;
723 managed_tile_state.picture_pile_analyzed = true; 723 managed_tile_state.picture_pile_analyzed = true;
724 managed_tile_state.need_to_gather_pixel_refs = false;
725 managed_tile_state.pending_pixel_refs.swap(
726 managed_tile_state.picture_pile_analysis.lazy_pixel_refs);
724 727
725 if (managed_tile_state.picture_pile_analysis.is_solid_color) { 728 if (managed_tile_state.picture_pile_analysis.is_solid_color) {
726 tile->drawing_info().set_solid_color( 729 tile->drawing_info().set_solid_color(
727 managed_tile_state.picture_pile_analysis.solid_color); 730 managed_tile_state.picture_pile_analysis.solid_color);
728 DidFinishTileInitialization(tile); 731 DidFinishTileInitialization(tile);
729 } else if (managed_tile_state.picture_pile_analysis.is_transparent) { 732 } else if (managed_tile_state.picture_pile_analysis.is_transparent) {
730 tile->drawing_info().set_transparent(); 733 tile->drawing_info().set_transparent();
731 DidFinishTileInitialization(tile); 734 DidFinishTileInitialization(tile);
732 } 735 }
733 } 736 }
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1105 decode_begin_time = base::TimeTicks::HighResNow(); 1108 decode_begin_time = base::TimeTicks::HighResNow();
1106 pixel_ref->Decode(); 1109 pixel_ref->Decode();
1107 if (stats) { 1110 if (stats) {
1108 stats->totalDeferredImageDecodeCount++; 1111 stats->totalDeferredImageDecodeCount++;
1109 stats->totalDeferredImageDecodeTime += 1112 stats->totalDeferredImageDecodeTime +=
1110 base::TimeTicks::HighResNow() - decode_begin_time; 1113 base::TimeTicks::HighResNow() - decode_begin_time;
1111 } 1114 }
1112 } 1115 }
1113 1116
1114 } // namespace cc 1117 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/picture_pile_impl.cc ('k') | skia/ext/analysis_canvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698