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

Side by Side Diff: content/common/gpu/image_transport_surface_iosurface_mac.cc

Issue 649533003: C++11 declares a type safe null pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Presubmit errors Created 6 years, 2 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698