| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef CC_TILES_IMAGE_DECODE_CONTROLLER_H_ | 5 #ifndef CC_TILES_IMAGE_DECODE_CONTROLLER_H_ |
| 6 #define CC_TILES_IMAGE_DECODE_CONTROLLER_H_ | 6 #define CC_TILES_IMAGE_DECODE_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "cc/playback/decoded_draw_image.h" | 9 #include "cc/playback/decoded_draw_image.h" |
| 10 #include "cc/playback/draw_image.h" | 10 #include "cc/playback/draw_image.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 const DecodedDrawImage& decoded_image) = 0; | 77 const DecodedDrawImage& decoded_image) = 0; |
| 78 | 78 |
| 79 // This function informs the controller that now is a good time to clean up | 79 // This function informs the controller that now is a good time to clean up |
| 80 // memory. This is called periodically from the compositor thread. | 80 // memory. This is called periodically from the compositor thread. |
| 81 virtual void ReduceCacheUsage() = 0; | 81 virtual void ReduceCacheUsage() = 0; |
| 82 | 82 |
| 83 // This function informs the controller that we are hidden and should not be | 83 // This function informs the controller that we are hidden and should not be |
| 84 // retaining cached resources longer than needed. | 84 // retaining cached resources longer than needed. |
| 85 virtual void SetShouldAggressivelyFreeResources( | 85 virtual void SetShouldAggressivelyFreeResources( |
| 86 bool aggressively_free_resources) = 0; | 86 bool aggressively_free_resources) = 0; |
| 87 |
| 88 // These functions process completion of image decode/upload tasks on origin |
| 89 // thread (i.e. on the compositor thread called by the tile manager). |
| 90 virtual void OnImageDecodeTaskCompleted(TileTask* task) = 0; |
| 91 virtual void OnImageUploadTaskCompleted(TileTask* task) = 0; |
| 87 }; | 92 }; |
| 88 | 93 |
| 89 } // namespace cc | 94 } // namespace cc |
| 90 | 95 |
| 91 #endif // CC_TILES_IMAGE_DECODE_CONTROLLER_H_ | 96 #endif // CC_TILES_IMAGE_DECODE_CONTROLLER_H_ |
| OLD | NEW |