| OLD | NEW |
| 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 "ui/gfx/mac/io_surface.h" | 5 #include "ui/gfx/mac/io_surface.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/mac/mac_util.h" | 12 #include "base/mac/mac_util.h" |
| 13 #include "base/mac/mach_logging.h" | 13 #include "base/mac/mach_logging.h" |
| 14 #include "base/macros.h" | 14 #include "base/macros.h" |
| 15 #include "base/metrics/histogram_macros.h" | 15 #include "base/metrics/histogram_macros.h" |
| 16 #include "base/trace_event/trace_event.h" | 16 #include "base/trace_event/trace_event.h" |
| 17 #include "ui/gfx/buffer_format_util.h" | 17 #include "ui/gfx/buffer_format_util.h" |
| 18 #include "ui/gfx/switches.h" | 18 #include "ui/gfx/color_space_switches.h" |
| 19 | 19 |
| 20 namespace gfx { | 20 namespace gfx { |
| 21 | 21 |
| 22 namespace { | 22 namespace { |
| 23 | 23 |
| 24 void AddIntegerValue(CFMutableDictionaryRef dictionary, | 24 void AddIntegerValue(CFMutableDictionaryRef dictionary, |
| 25 const CFStringRef key, | 25 const CFStringRef key, |
| 26 int32_t value) { | 26 int32_t value) { |
| 27 base::ScopedCFTypeRef<CFNumberRef> number( | 27 base::ScopedCFTypeRef<CFNumberRef> number( |
| 28 CFNumberCreate(NULL, kCFNumberSInt32Type, &value)); | 28 CFNumberCreate(NULL, kCFNumberSInt32Type, &value)); |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 // Note that nullptr is an acceptable input to IOSurfaceSetValue. | 224 // Note that nullptr is an acceptable input to IOSurfaceSetValue. |
| 225 IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), color_space_icc); | 225 IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), color_space_icc); |
| 226 } | 226 } |
| 227 | 227 |
| 228 UMA_HISTOGRAM_TIMES("GPU.IOSurface.CreateTime", | 228 UMA_HISTOGRAM_TIMES("GPU.IOSurface.CreateTime", |
| 229 base::TimeTicks::Now() - start_time); | 229 base::TimeTicks::Now() - start_time); |
| 230 return surface; | 230 return surface; |
| 231 } | 231 } |
| 232 | 232 |
| 233 } // namespace gfx | 233 } // namespace gfx |
| OLD | NEW |