| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ui/gl/gl_image_io_surface.h" | 5 #include "ui/gl/gl_image_io_surface.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/mac/foundation_util.h" | 10 #include "base/mac/foundation_util.h" |
| 11 #include "base/strings/stringize_macros.h" | 11 #include "base/strings/stringize_macros.h" |
| 12 #include "base/trace_event/memory_allocator_dump.h" | 12 #include "base/trace_event/memory_allocator_dump.h" |
| 13 #include "base/trace_event/memory_dump_manager.h" | 13 #include "base/trace_event/memory_dump_manager.h" |
| 14 #include "base/trace_event/process_memory_dump.h" | 14 #include "base/trace_event/process_memory_dump.h" |
| 15 #include "ui/gl/gl_bindings.h" | 15 #include "ui/gl/gl_bindings.h" |
| 16 #include "ui/gl/gl_context.h" | 16 #include "ui/gl/gl_context.h" |
| 17 #include "ui/gl/gl_helper.h" | 17 #include "ui/gl/gl_helper.h" |
| 18 #include "ui/gl/scoped_binders.h" | 18 #include "ui/gl/scoped_binders.h" |
| 19 | 19 |
| 20 // Note that this must be included after gl_bindings.h to avoid conflicts. | 20 // Note that this must be included after gl_bindings.h to avoid conflicts. |
| 21 #include <OpenGL/CGLIOSurface.h> | 21 #include <OpenGL/CGLIOSurface.h> |
| 22 #include <Quartz/Quartz.h> | 22 #include <Quartz/Quartz.h> |
| 23 #include <stddef.h> |
| 23 | 24 |
| 24 using gfx::BufferFormat; | 25 using gfx::BufferFormat; |
| 25 | 26 |
| 26 namespace gl { | 27 namespace gl { |
| 27 namespace { | 28 namespace { |
| 28 | 29 |
| 29 using WidgetToLayerMap = std::map<gfx::AcceleratedWidget, CALayer*>; | 30 using WidgetToLayerMap = std::map<gfx::AcceleratedWidget, CALayer*>; |
| 30 base::LazyInstance<WidgetToLayerMap> g_widget_to_layer_map; | 31 base::LazyInstance<WidgetToLayerMap> g_widget_to_layer_map; |
| 31 | 32 |
| 32 // clang-format off | 33 // clang-format off |
| (...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 g_widget_to_layer_map.Pointer()->erase(widget); | 409 g_widget_to_layer_map.Pointer()->erase(widget); |
| 409 } | 410 } |
| 410 | 411 |
| 411 // static | 412 // static |
| 412 unsigned GLImageIOSurface::GetInternalFormatForTesting( | 413 unsigned GLImageIOSurface::GetInternalFormatForTesting( |
| 413 gfx::BufferFormat format) { | 414 gfx::BufferFormat format) { |
| 414 DCHECK(ValidFormat(format)); | 415 DCHECK(ValidFormat(format)); |
| 415 return TextureFormat(format); | 416 return TextureFormat(format); |
| 416 } | 417 } |
| 417 } // namespace gl | 418 } // namespace gl |
| OLD | NEW |