OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "content/common/gpu/image_transport_surface_iosurface_mac.h" | 5 #include "content/common/gpu/image_transport_surface_iosurface_mac.h" |
6 | 6 |
7 #include "content/common/gpu/gpu_messages.h" | 7 #include "content/common/gpu/gpu_messages.h" |
8 #include "content/common/gpu/surface_handle_types_mac.h" | 8 #include "content/common/gpu/surface_handle_types_mac.h" |
9 | 9 |
10 namespace content { | 10 namespace content { |
(...skipping 16 matching lines...) Expand all Loading... |
27 const CFStringRef key, | 27 const CFStringRef key, |
28 bool value) { | 28 bool value) { |
29 CFDictionaryAddValue(dictionary, key, | 29 CFDictionaryAddValue(dictionary, key, |
30 (value ? kCFBooleanTrue : kCFBooleanFalse)); | 30 (value ? kCFBooleanTrue : kCFBooleanFalse)); |
31 } | 31 } |
32 | 32 |
33 void AddIntegerValue(CFMutableDictionaryRef dictionary, | 33 void AddIntegerValue(CFMutableDictionaryRef dictionary, |
34 const CFStringRef key, | 34 const CFStringRef key, |
35 int32 value) { | 35 int32 value) { |
36 base::ScopedCFTypeRef<CFNumberRef> number( | 36 base::ScopedCFTypeRef<CFNumberRef> number( |
37 CFNumberCreate(NULL, kCFNumberSInt32Type, &value)); | 37 CFNumberCreate(nullptr, kCFNumberSInt32Type, &value)); |
38 CFDictionaryAddValue(dictionary, key, number.get()); | 38 CFDictionaryAddValue(dictionary, key, number.get()); |
39 } | 39 } |
40 | 40 |
41 } // namespace | 41 } // namespace |
42 | 42 |
43 IOSurfaceStorageProvider::IOSurfaceStorageProvider( | 43 IOSurfaceStorageProvider::IOSurfaceStorageProvider( |
44 ImageTransportSurfaceFBO* transport_surface) | 44 ImageTransportSurfaceFBO* transport_surface) |
45 : transport_surface_(transport_surface) {} | 45 : transport_surface_(transport_surface) {} |
46 | 46 |
47 IOSurfaceStorageProvider::~IOSurfaceStorageProvider() { | 47 IOSurfaceStorageProvider::~IOSurfaceStorageProvider() { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 void IOSurfaceStorageProvider::DiscardBackbuffer() { | 124 void IOSurfaceStorageProvider::DiscardBackbuffer() { |
125 } | 125 } |
126 | 126 |
127 void IOSurfaceStorageProvider::SwapBuffersAckedByBrowser( | 127 void IOSurfaceStorageProvider::SwapBuffersAckedByBrowser( |
128 bool disable_throttling) { | 128 bool disable_throttling) { |
129 DCHECK(!pending_swapped_surfaces_.empty()); | 129 DCHECK(!pending_swapped_surfaces_.empty()); |
130 pending_swapped_surfaces_.pop_front(); | 130 pending_swapped_surfaces_.pop_front(); |
131 } | 131 } |
132 | 132 |
133 } // namespace content | 133 } // namespace content |
OLD | NEW |