| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/debug/rasterize_and_record_benchmark_impl.h" | 5 #include "cc/debug/rasterize_and_record_benchmark_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 } | 65 } |
| 66 | 66 |
| 67 class FixedInvalidationPictureLayerTilingClient | 67 class FixedInvalidationPictureLayerTilingClient |
| 68 : public PictureLayerTilingClient { | 68 : public PictureLayerTilingClient { |
| 69 public: | 69 public: |
| 70 FixedInvalidationPictureLayerTilingClient( | 70 FixedInvalidationPictureLayerTilingClient( |
| 71 PictureLayerTilingClient* base_client, | 71 PictureLayerTilingClient* base_client, |
| 72 const Region invalidation) | 72 const Region invalidation) |
| 73 : base_client_(base_client), invalidation_(invalidation) {} | 73 : base_client_(base_client), invalidation_(invalidation) {} |
| 74 | 74 |
| 75 scoped_refptr<Tile> CreateTile(float contents_scale, | 75 scoped_refptr<Tile> CreateTile( |
| 76 const gfx::Rect& content_rect) override { | 76 float contents_scale, |
| 77 return base_client_->CreateTile(contents_scale, content_rect); | 77 const gfx::Rect& content_rect, |
| 78 scoped_refptr<RasterSource>* raster_source) override { |
| 79 return base_client_->CreateTile(contents_scale, content_rect, |
| 80 raster_source); |
| 78 } | 81 } |
| 79 | 82 |
| 80 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override { | 83 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override { |
| 81 return base_client_->CalculateTileSize(content_bounds); | 84 return base_client_->CalculateTileSize(content_bounds); |
| 82 } | 85 } |
| 83 | 86 |
| 84 // This is the only function that returns something different from the base | 87 // This is the only function that returns something different from the base |
| 85 // client. Avoids sharing tiles in this area. | 88 // client. Avoids sharing tiles in this area. |
| 86 const Region* GetPendingInvalidation() override { return &invalidation_; } | 89 const Region* GetPendingInvalidation() override { return &invalidation_; } |
| 87 | 90 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 222 total_memory_usage(0), | 225 total_memory_usage(0), |
| 223 total_layers(0), | 226 total_layers(0), |
| 224 total_picture_layers(0), | 227 total_picture_layers(0), |
| 225 total_picture_layers_with_no_content(0), | 228 total_picture_layers_with_no_content(0), |
| 226 total_picture_layers_off_screen(0) { | 229 total_picture_layers_off_screen(0) { |
| 227 } | 230 } |
| 228 | 231 |
| 229 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} | 232 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} |
| 230 | 233 |
| 231 } // namespace cc | 234 } // namespace cc |
| OLD | NEW |