Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/tiles/image_controller.h" | 5 #include "cc/tiles/image_controller.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/optional.h" | 10 #include "base/optional.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 122 } | 122 } |
| 123 DecodedDrawImage GetDecodedImageForDraw(const DrawImage& image) override { | 123 DecodedDrawImage GetDecodedImageForDraw(const DrawImage& image) override { |
| 124 return DecodedDrawImage(nullptr, kNone_SkFilterQuality); | 124 return DecodedDrawImage(nullptr, kNone_SkFilterQuality); |
| 125 } | 125 } |
| 126 void DrawWithImageFinished(const DrawImage& image, | 126 void DrawWithImageFinished(const DrawImage& image, |
| 127 const DecodedDrawImage& decoded_image) override {} | 127 const DecodedDrawImage& decoded_image) override {} |
| 128 void ReduceCacheUsage() override {} | 128 void ReduceCacheUsage() override {} |
| 129 void SetShouldAggressivelyFreeResources( | 129 void SetShouldAggressivelyFreeResources( |
| 130 bool aggressively_free_resources) override {} | 130 bool aggressively_free_resources) override {} |
| 131 void ClearCache() override {} | 131 void ClearCache() override {} |
| 132 void NotifyImageUnused(uint32_t skimage_id) override {}; | |
|
vmpstr
2017/06/20 17:10:23
I think format is confused because you have a trai
sohan
2017/06/20 17:19:08
Done.
Ah! good catch :)
| |
| 132 size_t GetMaximumMemoryLimitBytes() const override { | 133 size_t GetMaximumMemoryLimitBytes() const override { |
| 133 return 256 * 1024 * 1024; | 134 return 256 * 1024 * 1024; |
| 134 } | 135 } |
| 135 | 136 |
| 136 int number_of_refs() const { return number_of_refs_; } | 137 int number_of_refs() const { return number_of_refs_; } |
| 137 void SetTaskToUse(scoped_refptr<TileTask> task) { task_to_use_ = task; } | 138 void SetTaskToUse(scoped_refptr<TileTask> task) { task_to_use_ = task; } |
| 138 | 139 |
| 139 private: | 140 private: |
| 140 int number_of_refs_ = 0; | 141 int number_of_refs_ = 0; |
| 141 scoped_refptr<TileTask> task_to_use_; | 142 scoped_refptr<TileTask> task_to_use_; |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 601 decode_client2.result()); | 602 decode_client2.result()); |
| 602 | 603 |
| 603 // Reset the controller since the order of destruction is wrong in this test | 604 // Reset the controller since the order of destruction is wrong in this test |
| 604 // (|other_cache| should outlive the controller. This is normally done via | 605 // (|other_cache| should outlive the controller. This is normally done via |
| 605 // SetImageDecodeCache(nullptr) or it can be done in the dtor of the cache.) | 606 // SetImageDecodeCache(nullptr) or it can be done in the dtor of the cache.) |
| 606 ResetController(); | 607 ResetController(); |
| 607 } | 608 } |
| 608 | 609 |
| 609 } // namespace | 610 } // namespace |
| 610 } // namespace cc | 611 } // namespace cc |
| OLD | NEW |