| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 } | 67 } |
| 68 | 68 |
| 69 class FixedInvalidationPictureLayerTilingClient | 69 class FixedInvalidationPictureLayerTilingClient |
| 70 : public PictureLayerTilingClient { | 70 : public PictureLayerTilingClient { |
| 71 public: | 71 public: |
| 72 FixedInvalidationPictureLayerTilingClient( | 72 FixedInvalidationPictureLayerTilingClient( |
| 73 PictureLayerTilingClient* base_client, | 73 PictureLayerTilingClient* base_client, |
| 74 const Region invalidation) | 74 const Region invalidation) |
| 75 : base_client_(base_client), invalidation_(invalidation) {} | 75 : base_client_(base_client), invalidation_(invalidation) {} |
| 76 | 76 |
| 77 ScopedTilePtr CreateTile(const Tile::CreateInfo& info) override { | 77 std::unique_ptr<Tile> CreateTile(const Tile::CreateInfo& info) override { |
| 78 return base_client_->CreateTile(info); | 78 return base_client_->CreateTile(info); |
| 79 } | 79 } |
| 80 | 80 |
| 81 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override { | 81 gfx::Size CalculateTileSize(const gfx::Size& content_bounds) const override { |
| 82 return base_client_->CalculateTileSize(content_bounds); | 82 return base_client_->CalculateTileSize(content_bounds); |
| 83 } | 83 } |
| 84 | 84 |
| 85 // This is the only function that returns something different from the base | 85 // This is the only function that returns something different from the base |
| 86 // client. Avoids sharing tiles in this area. | 86 // client. Avoids sharing tiles in this area. |
| 87 const Region* GetPendingInvalidation() override { return &invalidation_; } | 87 const Region* GetPendingInvalidation() override { return &invalidation_; } |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 total_memory_usage(0), | 218 total_memory_usage(0), |
| 219 total_layers(0), | 219 total_layers(0), |
| 220 total_picture_layers(0), | 220 total_picture_layers(0), |
| 221 total_picture_layers_with_no_content(0), | 221 total_picture_layers_with_no_content(0), |
| 222 total_picture_layers_off_screen(0) { | 222 total_picture_layers_off_screen(0) { |
| 223 } | 223 } |
| 224 | 224 |
| 225 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} | 225 RasterizeAndRecordBenchmarkImpl::RasterizeResults::~RasterizeResults() {} |
| 226 | 226 |
| 227 } // namespace cc | 227 } // namespace cc |
| OLD | NEW |