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

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

Issue 2795803002: Clear Image Decode Cache on Navigation (Closed)
Patch Set: fix conversion Created 3 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
« no previous file with comments | « cc/raster/image_hijack_canvas_unittest.cc ('k') | cc/tiles/gpu_image_decode_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CC_TILES_GPU_IMAGE_DECODE_CACHE_H_ 5 #ifndef CC_TILES_GPU_IMAGE_DECODE_CACHE_H_
6 #define CC_TILES_GPU_IMAGE_DECODE_CACHE_H_ 6 #define CC_TILES_GPU_IMAGE_DECODE_CACHE_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <vector> 10 #include <vector>
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 bool GetOutOfRasterDecodeTaskForImageAndRef( 117 bool GetOutOfRasterDecodeTaskForImageAndRef(
118 const DrawImage& image, 118 const DrawImage& image,
119 scoped_refptr<TileTask>* task) override; 119 scoped_refptr<TileTask>* task) override;
120 void UnrefImage(const DrawImage& image) override; 120 void UnrefImage(const DrawImage& image) override;
121 DecodedDrawImage GetDecodedImageForDraw(const DrawImage& draw_image) override; 121 DecodedDrawImage GetDecodedImageForDraw(const DrawImage& draw_image) override;
122 void DrawWithImageFinished(const DrawImage& image, 122 void DrawWithImageFinished(const DrawImage& image,
123 const DecodedDrawImage& decoded_image) override; 123 const DecodedDrawImage& decoded_image) override;
124 void ReduceCacheUsage() override; 124 void ReduceCacheUsage() override;
125 void SetShouldAggressivelyFreeResources( 125 void SetShouldAggressivelyFreeResources(
126 bool aggressively_free_resources) override; 126 bool aggressively_free_resources) override;
127 void ClearCache() override;
127 128
128 // MemoryDumpProvider overrides. 129 // MemoryDumpProvider overrides.
129 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, 130 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
130 base::trace_event::ProcessMemoryDump* pmd) override; 131 base::trace_event::ProcessMemoryDump* pmd) override;
131 132
132 // base::MemoryCoordinatorClient overrides. 133 // base::MemoryCoordinatorClient overrides.
133 void OnMemoryStateChange(base::MemoryState state) override; 134 void OnMemoryStateChange(base::MemoryState state) override;
134 void OnPurgeMemory() override; 135 void OnPurgeMemory() override;
135 136
136 // Called by Decode / Upload tasks. 137 // Called by Decode / Upload tasks.
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 349
349 // We can't release GPU backed SkImages without holding the context lock, 350 // We can't release GPU backed SkImages without holding the context lock,
350 // so we add them to this list and defer deletion until the next time the lock 351 // so we add them to this list and defer deletion until the next time the lock
351 // is held. 352 // is held.
352 std::vector<sk_sp<SkImage>> images_pending_deletion_; 353 std::vector<sk_sp<SkImage>> images_pending_deletion_;
353 }; 354 };
354 355
355 } // namespace cc 356 } // namespace cc
356 357
357 #endif // CC_TILES_GPU_IMAGE_DECODE_CACHE_H_ 358 #endif // CC_TILES_GPU_IMAGE_DECODE_CACHE_H_
OLDNEW
« no previous file with comments | « cc/raster/image_hijack_canvas_unittest.cc ('k') | cc/tiles/gpu_image_decode_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698