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

Side by Side Diff: ui/gfx/mac/io_surface.cc

Issue 2915673003: ui/gfx: Use separate components for color_space and switches (Closed)
Patch Set: Review feedback Created 3 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 | « ui/gfx/icc_profile.cc ('k') | ui/gfx/skia_color_space_util.h » ('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 "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
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
OLDNEW
« no previous file with comments | « ui/gfx/icc_profile.cc ('k') | ui/gfx/skia_color_space_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698