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

Side by Side Diff: cc/tiles/software_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
« no previous file with comments | « cc/tiles/image_decode_controller.h ('k') | cc/tiles/software_image_decode_controller.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_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ 5 #ifndef CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_
6 #define CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ 6 #define CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 // ImageDecodeController overrides. 110 // ImageDecodeController overrides.
111 bool GetTaskForImageAndRef(const DrawImage& image, 111 bool GetTaskForImageAndRef(const DrawImage& image,
112 uint64_t prepare_tiles_id, 112 uint64_t prepare_tiles_id,
113 scoped_refptr<ImageDecodeTask>* task) override; 113 scoped_refptr<ImageDecodeTask>* task) override;
114 void UnrefImage(const DrawImage& image) override; 114 void UnrefImage(const DrawImage& image) override;
115 DecodedDrawImage GetDecodedImageForDraw(const DrawImage& image) override; 115 DecodedDrawImage GetDecodedImageForDraw(const DrawImage& image) override;
116 void DrawWithImageFinished(const DrawImage& image, 116 void DrawWithImageFinished(const DrawImage& image,
117 const DecodedDrawImage& decoded_image) override; 117 const DecodedDrawImage& decoded_image) override;
118 void ReduceCacheUsage() override; 118 void ReduceCacheUsage() override;
119 // Software doesn't keep outstanding images pinned, so this is a no-op.
120 void SetShouldAggressivelyFreeResources(
121 bool aggressively_free_resources) override {}
119 122
120 // Decode the given image and store it in the cache. This is only called by an 123 // Decode the given image and store it in the cache. This is only called by an
121 // image decode task from a worker thread. 124 // image decode task from a worker thread.
122 void DecodeImage(const ImageKey& key, const DrawImage& image); 125 void DecodeImage(const ImageKey& key, const DrawImage& image);
123 126
124 void RemovePendingTask(const ImageKey& key); 127 void RemovePendingTask(const ImageKey& key);
125 128
126 // MemoryDumpProvider overrides. 129 // MemoryDumpProvider overrides.
127 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args, 130 bool OnMemoryDump(const base::trace_event::MemoryDumpArgs& args,
128 base::trace_event::ProcessMemoryDump* pmd) override; 131 base::trace_event::ProcessMemoryDump* pmd) override;
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 253
251 ResourceFormat format_; 254 ResourceFormat format_;
252 255
253 // Used to uniquely identify DecodedImages for memory traces. 256 // Used to uniquely identify DecodedImages for memory traces.
254 base::AtomicSequenceNumber next_tracing_id_; 257 base::AtomicSequenceNumber next_tracing_id_;
255 }; 258 };
256 259
257 } // namespace cc 260 } // namespace cc
258 261
259 #endif // CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_ 262 #endif // CC_TILES_SOFTWARE_IMAGE_DECODE_CONTROLLER_H_
OLDNEW
« no previous file with comments | « cc/tiles/image_decode_controller.h ('k') | cc/tiles/software_image_decode_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698