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

Side by Side Diff: cc/tiles/image_decode_controller.h

Issue 1832573004: Gpu Image Decode Controller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 unified diff | Download patch
OLDNEW
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 // required. 55 // required.
56 virtual DecodedDrawImage GetDecodedImageForDraw(const DrawImage& image) = 0; 56 virtual DecodedDrawImage GetDecodedImageForDraw(const DrawImage& image) = 0;
57 // Unrefs an image. This should be called for every GetDecodedImageForDraw 57 // Unrefs an image. This should be called for every GetDecodedImageForDraw
58 // when the draw with the image is finished. 58 // when the draw with the image is finished.
59 virtual void DrawWithImageFinished(const DrawImage& image, 59 virtual void DrawWithImageFinished(const DrawImage& image,
60 const DecodedDrawImage& decoded_image) = 0; 60 const DecodedDrawImage& decoded_image) = 0;
61 61
62 // This function informs the controller that now is a good time to clean up 62 // This function informs the controller that now is a good time to clean up
63 // memory. This is called periodically from the compositor thread. 63 // memory. This is called periodically from the compositor thread.
64 virtual void ReduceCacheUsage() = 0; 64 virtual void ReduceCacheUsage() = 0;
65
66 // This function informs the controller that we are hidden and should not be
67 // retaining cached resources longer than needed.
68 virtual void SetShouldAggressivelyFreeResources(
69 bool aggressively_free_resources) = 0;
65 }; 70 };
66 71
67 } // namespace cc 72 } // namespace cc
68 73
69 #endif // CC_TILES_IMAGE_DECODE_CONTROLLER_H_ 74 #endif // CC_TILES_IMAGE_DECODE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « cc/tiles/gpu_image_decode_controller_unittest.cc ('k') | cc/tiles/software_image_decode_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698