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

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

Issue 2020993004: Implement TransferableResource StructTraits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 6 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/gpu_image_decode_controller.cc ('k') | components/bitmap_uploader/bitmap_uploader.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_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 <algorithm> 9 #include <algorithm>
10 #include <functional> 10 #include <functional>
11 11
12 #include "base/format_macros.h" 12 #include "base/format_macros.h"
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/discardable_memory.h" 14 #include "base/memory/discardable_memory.h"
15 #include "base/memory/ptr_util.h" 15 #include "base/memory/ptr_util.h"
16 #include "base/metrics/histogram_macros.h" 16 #include "base/metrics/histogram_macros.h"
17 #include "base/strings/stringprintf.h" 17 #include "base/strings/stringprintf.h"
18 #include "base/threading/thread_task_runner_handle.h" 18 #include "base/threading/thread_task_runner_handle.h"
19 #include "base/trace_event/memory_dump_manager.h" 19 #include "base/trace_event/memory_dump_manager.h"
20 #include "cc/debug/devtools_instrumentation.h" 20 #include "cc/debug/devtools_instrumentation.h"
21 #include "cc/raster/tile_task.h" 21 #include "cc/raster/tile_task.h"
22 #include "cc/resources/resource_format_utils.h"
22 #include "third_party/skia/include/core/SkCanvas.h" 23 #include "third_party/skia/include/core/SkCanvas.h"
23 #include "third_party/skia/include/core/SkImage.h" 24 #include "third_party/skia/include/core/SkImage.h"
24 #include "third_party/skia/include/core/SkPixmap.h" 25 #include "third_party/skia/include/core/SkPixmap.h"
25 #include "ui/gfx/skia_util.h" 26 #include "ui/gfx/skia_util.h"
26 27
27 namespace cc { 28 namespace cc {
28 namespace { 29 namespace {
29 30
30 // The largest single high quality image to try and process. Images above this 31 // The largest single high quality image to try and process. Images above this
31 // size will drop down to medium quality. 32 // size will drop down to medium quality.
(...skipping 978 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 void SoftwareImageDecodeController::MemoryBudget::ResetUsage() { 1011 void SoftwareImageDecodeController::MemoryBudget::ResetUsage() {
1011 current_usage_bytes_ = 0; 1012 current_usage_bytes_ = 0;
1012 } 1013 }
1013 1014
1014 size_t SoftwareImageDecodeController::MemoryBudget::GetCurrentUsageSafe() 1015 size_t SoftwareImageDecodeController::MemoryBudget::GetCurrentUsageSafe()
1015 const { 1016 const {
1016 return current_usage_bytes_.ValueOrDie(); 1017 return current_usage_bytes_.ValueOrDie();
1017 } 1018 }
1018 1019
1019 } // namespace cc 1020 } // namespace cc
OLDNEW
« no previous file with comments | « cc/tiles/gpu_image_decode_controller.cc ('k') | components/bitmap_uploader/bitmap_uploader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698