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

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

Issue 816543004: Update from https://crrev.com/308996 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/resource_provider.cc ('k') | cc/resources/tile_manager_perftest.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/tile_manager.h" 5 #include "cc/resources/tile_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <string> 9 #include <string>
10 10
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 UMA_HISTOGRAM_BOOLEAN("Renderer4.SolidColorTilesAnalyzed", 101 UMA_HISTOGRAM_BOOLEAN("Renderer4.SolidColorTilesAnalyzed",
102 analysis_.is_solid_color); 102 analysis_.is_solid_color);
103 103
104 // Clear the flag if we're not using the estimator. 104 // Clear the flag if we're not using the estimator.
105 analysis_.is_solid_color &= kUseColorEstimator; 105 analysis_.is_solid_color &= kUseColorEstimator;
106 } 106 }
107 107
108 void Raster(const RasterSource* raster_source) { 108 void Raster(const RasterSource* raster_source) {
109 frame_viewer_instrumentation::ScopedRasterTask raster_task( 109 frame_viewer_instrumentation::ScopedRasterTask raster_task(
110 tile_id_, tile_resolution_, source_frame_number_, layer_id_); 110 tile_id_, tile_resolution_, source_frame_number_, layer_id_);
111 devtools_instrumentation::ScopedLayerTask layer_task(
112 devtools_instrumentation::kRasterTask, layer_id_);
113 111
114 DCHECK(raster_source); 112 DCHECK(raster_source);
115 113
116 raster_buffer_->Playback(raster_source_.get(), content_rect_, 114 raster_buffer_->Playback(raster_source_.get(), content_rect_,
117 contents_scale_); 115 contents_scale_);
118 } 116 }
119 117
120 RasterSource::SolidColorAnalysis analysis_; 118 RasterSource::SolidColorAnalysis analysis_;
121 scoped_refptr<RasterSource> raster_source_; 119 scoped_refptr<RasterSource> raster_source_;
122 gfx::Rect content_rect_; 120 gfx::Rect content_rect_;
(...skipping 817 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 result -= other; 938 result -= other;
941 return result; 939 return result;
942 } 940 }
943 941
944 bool TileManager::MemoryUsage::Exceeds(const MemoryUsage& limit) const { 942 bool TileManager::MemoryUsage::Exceeds(const MemoryUsage& limit) const {
945 return memory_bytes_ > limit.memory_bytes_ || 943 return memory_bytes_ > limit.memory_bytes_ ||
946 resource_count_ > limit.resource_count_; 944 resource_count_ > limit.resource_count_;
947 } 945 }
948 946
949 } // namespace cc 947 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/resource_provider.cc ('k') | cc/resources/tile_manager_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698