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

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

Issue 1888713002: cc: Merge TileTaskRunner to TileTaskWorkerPool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@rename_tile_task_client
Patch Set: feedback 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
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_controller.h" 5 #include "cc/tiles/software_image_decode_controller.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <functional> 9 #include <functional>
10 10
11 #include "base/format_macros.h" 11 #include "base/format_macros.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "base/memory/discardable_memory.h" 13 #include "base/memory/discardable_memory.h"
14 #include "base/memory/ptr_util.h" 14 #include "base/memory/ptr_util.h"
15 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
16 #include "base/thread_task_runner_handle.h" 16 #include "base/thread_task_runner_handle.h"
17 #include "base/trace_event/memory_dump_manager.h" 17 #include "base/trace_event/memory_dump_manager.h"
18 #include "cc/debug/devtools_instrumentation.h" 18 #include "cc/debug/devtools_instrumentation.h"
19 #include "cc/raster/tile_task_runner.h" 19 #include "cc/raster/tile_task.h"
20 #include "third_party/skia/include/core/SkCanvas.h" 20 #include "third_party/skia/include/core/SkCanvas.h"
21 #include "third_party/skia/include/core/SkImage.h" 21 #include "third_party/skia/include/core/SkImage.h"
22 #include "ui/gfx/skia_util.h" 22 #include "ui/gfx/skia_util.h"
23 23
24 namespace cc { 24 namespace cc {
25 namespace { 25 namespace {
26 26
27 // The amount of memory we can lock ahead of time (128MB). This limit is only 27 // The amount of memory we can lock ahead of time (128MB). This limit is only
28 // used to inform the caller of the amount of space available in the cache. The 28 // used to inform the caller of the amount of space available in the cache. The
29 // caller can still request tasks which can cause this limit to be breached. 29 // caller can still request tasks which can cause this limit to be breached.
(...skipping 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
933 void SoftwareImageDecodeController::MemoryBudget::ResetUsage() { 933 void SoftwareImageDecodeController::MemoryBudget::ResetUsage() {
934 current_usage_bytes_ = 0; 934 current_usage_bytes_ = 0;
935 } 935 }
936 936
937 size_t SoftwareImageDecodeController::MemoryBudget::GetCurrentUsageSafe() 937 size_t SoftwareImageDecodeController::MemoryBudget::GetCurrentUsageSafe()
938 const { 938 const {
939 return current_usage_bytes_.ValueOrDie(); 939 return current_usage_bytes_.ValueOrDie();
940 } 940 }
941 941
942 } // namespace cc 942 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/software_image_decode_controller.h ('k') | cc/tiles/software_image_decode_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698