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

Side by Side Diff: cc/tiles/software_image_decode_cache.cc

Issue 2710593003: cc: Fix const value pattern by replacing it by non-const or reference. (Closed)
Patch Set: update rebase Created 3 years, 10 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/prioritized_tile.cc ('k') | cc/trees/layer_tree_host_unittest_scroll.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 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 #include "cc/tiles/software_image_decode_cache.h" 5 #include "cc/tiles/software_image_decode_cache.h"
6 6
7 #include <inttypes.h> 7 #include <inttypes.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 SoftwareImageDecodeCache* cache_; 90 SoftwareImageDecodeCache* cache_;
91 const DrawImage& draw_image_; 91 const DrawImage& draw_image_;
92 const DecodedDrawImage& decoded_draw_image_; 92 const DecodedDrawImage& decoded_draw_image_;
93 }; 93 };
94 94
95 class ImageDecodeTaskImpl : public TileTask { 95 class ImageDecodeTaskImpl : public TileTask {
96 public: 96 public:
97 ImageDecodeTaskImpl(SoftwareImageDecodeCache* cache, 97 ImageDecodeTaskImpl(SoftwareImageDecodeCache* cache,
98 const SoftwareImageDecodeCache::ImageKey& image_key, 98 const SoftwareImageDecodeCache::ImageKey& image_key,
99 const DrawImage& image, 99 const DrawImage& image,
100 const SoftwareImageDecodeCache::DecodeTaskType task_type, 100 SoftwareImageDecodeCache::DecodeTaskType task_type,
101 const ImageDecodeCache::TracingInfo& tracing_info) 101 const ImageDecodeCache::TracingInfo& tracing_info)
102 : TileTask(true), 102 : TileTask(true),
103 cache_(cache), 103 cache_(cache),
104 image_key_(image_key), 104 image_key_(image_key),
105 image_(image), 105 image_(image),
106 task_type_(task_type), 106 task_type_(task_type),
107 tracing_info_(tracing_info) {} 107 tracing_info_(tracing_info) {}
108 108
109 // Overridden from Task: 109 // Overridden from Task:
110 void RunOnWorkerThread() override { 110 void RunOnWorkerThread() override {
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
1177 } 1177 }
1178 } 1178 }
1179 } 1179 }
1180 1180
1181 void SoftwareImageDecodeCache::OnPurgeMemory() { 1181 void SoftwareImageDecodeCache::OnPurgeMemory() {
1182 base::AutoLock lock(lock_); 1182 base::AutoLock lock(lock_);
1183 ReduceCacheUsageUntilWithinLimit(0); 1183 ReduceCacheUsageUntilWithinLimit(0);
1184 } 1184 }
1185 1185
1186 } // namespace cc 1186 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/prioritized_tile.cc ('k') | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698