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

Unified Diff: cc/tiles/software_image_decode_cache.cc

Issue 2867693004: Snapshot of all changes to get jumbo in blink and content.
Patch Set: Exclude certain files from jumbo because of a Windows problem Created 3 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/raster/zero_copy_raster_buffer_provider.cc ('k') | content/browser/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/software_image_decode_cache.cc
diff --git a/cc/tiles/software_image_decode_cache.cc b/cc/tiles/software_image_decode_cache.cc
index 3458e5c67f36ed0069797e1e8e3f56bdc8798e1c..3e3bc4fe03169b387681d7e761866e7a65a500fd 100644
--- a/cc/tiles/software_image_decode_cache.cc
+++ b/cc/tiles/software_image_decode_cache.cc
@@ -37,9 +37,9 @@ namespace {
// if more items are locked. That is, locked items ignore this limit.
// Depending on the memory state of the system, we limit the amount of items
// differently.
-const size_t kNormalMaxItemsInCache = 1000;
-const size_t kThrottledMaxItemsInCache = 100;
-const size_t kSuspendedMaxItemsInCache = 0;
+const size_t kSIDNormalMaxItemsInCache = 1000;
+const size_t kSIDThrottledMaxItemsInCache = 100;
+const size_t kSIDSuspendedMaxItemsInCache = 0;
// If the size of the original sized image breaches kMemoryRatioToSubrect but we
// don't need to scale the image, consider caching only the needed subrect.
@@ -87,9 +87,9 @@ class AutoDrawWithImageFinished {
const DecodedDrawImage& decoded_draw_image_;
};
-class ImageDecodeTaskImpl : public TileTask {
+class ImageDecodeTaskImpl2 : public TileTask {
public:
- ImageDecodeTaskImpl(SoftwareImageDecodeCache* cache,
+ ImageDecodeTaskImpl2(SoftwareImageDecodeCache* cache,
const SoftwareImageDecodeCache::ImageKey& image_key,
const DrawImage& image,
SoftwareImageDecodeCache::DecodeTaskType task_type,
@@ -103,7 +103,7 @@ class ImageDecodeTaskImpl : public TileTask {
// Overridden from Task:
void RunOnWorkerThread() override {
- TRACE_EVENT2("cc", "ImageDecodeTaskImpl::RunOnWorkerThread", "mode",
+ TRACE_EVENT2("cc", "ImageDecodeTaskImpl2::RunOnWorkerThread", "mode",
"software", "source_prepare_tiles_id",
tracing_info_.prepare_tiles_id);
devtools_instrumentation::ScopedImageDecodeTask image_decode_task(
@@ -119,7 +119,7 @@ class ImageDecodeTaskImpl : public TileTask {
}
protected:
- ~ImageDecodeTaskImpl() override {}
+ ~ImageDecodeTaskImpl2() override {}
private:
SoftwareImageDecodeCache* cache_;
@@ -128,7 +128,7 @@ class ImageDecodeTaskImpl : public TileTask {
SoftwareImageDecodeCache::DecodeTaskType task_type_;
const ImageDecodeCache::TracingInfo tracing_info_;
- DISALLOW_COPY_AND_ASSIGN(ImageDecodeTaskImpl);
+ DISALLOW_COPY_AND_ASSIGN(ImageDecodeTaskImpl2);
};
SkSize GetScaleAdjustment(const ImageDecodeCacheKey& key) {
@@ -193,7 +193,7 @@ SoftwareImageDecodeCache::SoftwareImageDecodeCache(
at_raster_decoded_images_(ImageMRUCache::NO_AUTO_EVICT),
locked_images_budget_(locked_memory_limit_bytes),
color_type_(color_type),
- max_items_in_cache_(kNormalMaxItemsInCache) {
+ max_items_in_cache_(kSIDNormalMaxItemsInCache) {
// In certain cases, ThreadTaskRunnerHandle isn't set (Android Webview).
// Don't register a dump provider in these cases.
if (base::ThreadTaskRunnerHandle::IsSet()) {
@@ -318,7 +318,7 @@ bool SoftwareImageDecodeCache::GetTaskForImageAndRefInternal(
// ref.
RefImage(key);
existing_task = make_scoped_refptr(
- new ImageDecodeTaskImpl(this, key, image, task_type, tracing_info));
+ new ImageDecodeTaskImpl2(this, key, image, task_type, tracing_info));
*task = existing_task;
return true;
}
@@ -1210,13 +1210,13 @@ void SoftwareImageDecodeCache::OnMemoryStateChange(base::MemoryState state) {
base::AutoLock hold(lock_);
switch (state) {
case base::MemoryState::NORMAL:
- max_items_in_cache_ = kNormalMaxItemsInCache;
+ max_items_in_cache_ = kSIDNormalMaxItemsInCache;
break;
case base::MemoryState::THROTTLED:
- max_items_in_cache_ = kThrottledMaxItemsInCache;
+ max_items_in_cache_ = kSIDThrottledMaxItemsInCache;
break;
case base::MemoryState::SUSPENDED:
- max_items_in_cache_ = kSuspendedMaxItemsInCache;
+ max_items_in_cache_ = kSIDSuspendedMaxItemsInCache;
break;
case base::MemoryState::UNKNOWN:
NOTREACHED();
« no previous file with comments | « cc/raster/zero_copy_raster_buffer_provider.cc ('k') | content/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698