OLD | NEW |
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 #include "cc/tiles/gpu_image_decode_controller.h" | 5 #include "cc/tiles/gpu_image_decode_controller.h" |
6 | 6 |
7 #include "base/memory/discardable_memory_allocator.h" | 7 #include "base/memory/discardable_memory_allocator.h" |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/numerics/safe_math.h" | 9 #include "base/numerics/safe_math.h" |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
11 #include "base/threading/thread_task_runner_handle.h" | 11 #include "base/threading/thread_task_runner_handle.h" |
12 #include "cc/debug/devtools_instrumentation.h" | 12 #include "cc/debug/devtools_instrumentation.h" |
13 #include "cc/output/context_provider.h" | 13 #include "cc/output/context_provider.h" |
14 #include "cc/raster/tile_task.h" | 14 #include "cc/raster/tile_task.h" |
| 15 #include "cc/resources/resource_format_utils.h" |
15 #include "gpu/command_buffer/client/context_support.h" | 16 #include "gpu/command_buffer/client/context_support.h" |
16 #include "gpu/command_buffer/client/gles2_interface.h" | 17 #include "gpu/command_buffer/client/gles2_interface.h" |
17 #include "gpu_image_decode_controller.h" | 18 #include "gpu_image_decode_controller.h" |
18 #include "skia/ext/texture_handle.h" | 19 #include "skia/ext/texture_handle.h" |
19 #include "third_party/skia/include/core/SkCanvas.h" | 20 #include "third_party/skia/include/core/SkCanvas.h" |
20 #include "third_party/skia/include/core/SkRefCnt.h" | 21 #include "third_party/skia/include/core/SkRefCnt.h" |
21 #include "third_party/skia/include/core/SkSurface.h" | 22 #include "third_party/skia/include/core/SkSurface.h" |
22 #include "third_party/skia/include/gpu/GrContext.h" | 23 #include "third_party/skia/include/gpu/GrContext.h" |
23 #include "third_party/skia/include/gpu/GrTexture.h" | 24 #include "third_party/skia/include/gpu/GrTexture.h" |
24 #include "ui/gfx/skia_util.h" | 25 #include "ui/gfx/skia_util.h" |
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 bool GpuImageDecodeController::DiscardableIsLockedForTesting( | 858 bool GpuImageDecodeController::DiscardableIsLockedForTesting( |
858 const DrawImage& image) { | 859 const DrawImage& image) { |
859 base::AutoLock lock(lock_); | 860 base::AutoLock lock(lock_); |
860 auto found = image_data_.Peek(image.image()->uniqueID()); | 861 auto found = image_data_.Peek(image.image()->uniqueID()); |
861 DCHECK(found != image_data_.end()); | 862 DCHECK(found != image_data_.end()); |
862 ImageData* image_data = found->second.get(); | 863 ImageData* image_data = found->second.get(); |
863 return image_data->decode.is_locked; | 864 return image_data->decode.is_locked; |
864 } | 865 } |
865 | 866 |
866 } // namespace cc | 867 } // namespace cc |
OLD | NEW |