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

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

Issue 2904743002: cc: Add UMA for tracking decode duration for out of raster decodes. (Closed)
Patch Set: .. Created 3 years, 7 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 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 109
110 // ImageDecodeCache overrides. 110 // ImageDecodeCache overrides.
111 111
112 // Finds the existing uploaded image for the provided DrawImage. Creates an 112 // Finds the existing uploaded image for the provided DrawImage. Creates an
113 // upload task to upload the image if an exsiting image does not exist. 113 // upload task to upload the image if an exsiting image does not exist.
114 bool GetTaskForImageAndRef(const DrawImage& image, 114 bool GetTaskForImageAndRef(const DrawImage& image,
115 const TracingInfo& tracing_info, 115 const TracingInfo& tracing_info,
116 scoped_refptr<TileTask>* task) override; 116 scoped_refptr<TileTask>* task) override;
117 bool GetOutOfRasterDecodeTaskForImageAndRef( 117 bool GetOutOfRasterDecodeTaskForImageAndRef(
118 const DrawImage& image, 118 const DrawImage& image,
119 ImageDecodeType decode_type,
119 scoped_refptr<TileTask>* task) override; 120 scoped_refptr<TileTask>* task) override;
120 void UnrefImage(const DrawImage& image) override; 121 void UnrefImage(const DrawImage& image) override;
121 DecodedDrawImage GetDecodedImageForDraw(const DrawImage& draw_image) override; 122 DecodedDrawImage GetDecodedImageForDraw(const DrawImage& draw_image) override;
122 void DrawWithImageFinished(const DrawImage& image, 123 void DrawWithImageFinished(const DrawImage& image,
123 const DecodedDrawImage& decoded_image) override; 124 const DecodedDrawImage& decoded_image) override;
124 void ReduceCacheUsage() override; 125 void ReduceCacheUsage() override;
125 void SetShouldAggressivelyFreeResources( 126 void SetShouldAggressivelyFreeResources(
126 bool aggressively_free_resources) override; 127 bool aggressively_free_resources) override;
127 void ClearCache() override; 128 void ClearCache() override;
128 size_t GetMaximumMemoryLimitBytes() const override; 129 size_t GetMaximumMemoryLimitBytes() const override;
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 372
372 // We can't release GPU backed SkImages without holding the context lock, 373 // We can't release GPU backed SkImages without holding the context lock,
373 // so we add them to this list and defer deletion until the next time the lock 374 // so we add them to this list and defer deletion until the next time the lock
374 // is held. 375 // is held.
375 std::vector<sk_sp<SkImage>> images_pending_deletion_; 376 std::vector<sk_sp<SkImage>> images_pending_deletion_;
376 }; 377 };
377 378
378 } // namespace cc 379 } // namespace cc
379 380
380 #endif // CC_TILES_GPU_IMAGE_DECODE_CACHE_H_ 381 #endif // CC_TILES_GPU_IMAGE_DECODE_CACHE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698