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

Unified Diff: cc/debug/rasterize_and_record_benchmark_impl.cc

Issue 669813003: Update from chromium https://crrev.com/301725/ (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/layers/picture_image_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/debug/rasterize_and_record_benchmark_impl.cc
diff --git a/cc/debug/rasterize_and_record_benchmark_impl.cc b/cc/debug/rasterize_and_record_benchmark_impl.cc
index 612dad8249caf3558e12a99098e3c9ee297ed54c..b98465524104f4574f91051432c431126db7f814 100644
--- a/cc/debug/rasterize_and_record_benchmark_impl.cc
+++ b/cc/debug/rasterize_and_record_benchmark_impl.cc
@@ -25,11 +25,11 @@ const int kDefaultRasterizeRepeatCount = 100;
class BenchmarkRasterTask : public Task {
public:
- BenchmarkRasterTask(PicturePileImpl* picture_pile,
+ BenchmarkRasterTask(RasterSource* raster_source,
const gfx::Rect& content_rect,
float contents_scale,
size_t repeat_count)
- : picture_pile_(picture_pile),
+ : raster_source_(raster_source),
content_rect_(content_rect),
contents_scale_(contents_scale),
repeat_count_(repeat_count),
@@ -54,11 +54,11 @@ class BenchmarkRasterTask : public Task {
bitmap.allocPixels(SkImageInfo::MakeN32Premul(content_rect_.width(),
content_rect_.height()));
SkCanvas canvas(bitmap);
- PicturePileImpl::Analysis analysis;
+ RasterSource::SolidColorAnalysis analysis;
- picture_pile_->AnalyzeInRect(
+ raster_source_->PerformSolidColorAnalysis(
content_rect_, contents_scale_, &analysis, nullptr);
- picture_pile_->RasterToBitmap(
+ raster_source_->PlaybackToCanvas(
&canvas, content_rect_, contents_scale_, nullptr);
is_solid_color_ = analysis.is_solid_color;
@@ -78,7 +78,7 @@ class BenchmarkRasterTask : public Task {
private:
~BenchmarkRasterTask() override {}
- PicturePileImpl* picture_pile_;
+ RasterSource* raster_source_;
gfx::Rect content_rect_;
float contents_scale_;
size_t repeat_count_;
@@ -99,19 +99,21 @@ class FixedInvalidationPictureLayerTilingClient
return base_client_->CreateTile(tiling, content_rect);
}
- PicturePileImpl* GetPile() override { return base_client_->GetPile(); }
+ RasterSource* GetRasterSource() override {
+ return base_client_->GetRasterSource();
+ }
gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override {
return base_client_->CalculateTileSize(content_bounds);
}
// This is the only function that returns something different from the base
- // client.
- const Region* GetInvalidation() override { return &invalidation_; }
+ // client. Avoids sharing tiles in this area.
+ const Region* GetPendingInvalidation() override { return &invalidation_; }
- const PictureLayerTiling* GetTwinTiling(
+ const PictureLayerTiling* GetPendingOrActiveTwinTiling(
const PictureLayerTiling* tiling) const override {
- return base_client_->GetTwinTiling(tiling);
+ return base_client_->GetPendingOrActiveTwinTiling(tiling);
}
PictureLayerTiling* GetRecycledTwinTiling(
@@ -222,12 +224,12 @@ void RasterizeAndRecordBenchmarkImpl::RunOnLayer(PictureLayerImpl* layer) {
++it) {
DCHECK(*it);
- PicturePileImpl* picture_pile = (*it)->picture_pile();
+ RasterSource* raster_source = (*it)->raster_source();
gfx::Rect content_rect = (*it)->content_rect();
float contents_scale = (*it)->contents_scale();
scoped_refptr<BenchmarkRasterTask> benchmark_raster_task(
- new BenchmarkRasterTask(picture_pile,
+ new BenchmarkRasterTask(raster_source,
content_rect,
contents_scale,
rasterize_repeat_count_));
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/layers/picture_image_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698