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

Side by Side Diff: ui/surface/transport_dib_posix.cc

Issue 1550483002: Switch to standard integer types in ui/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@int-ui-events
Patch Set: Created 4 years, 12 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/surface/transport_dib.h ('k') | ui/surface/transport_dib_win.cc » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/surface/transport_dib.h" 5 #include "ui/surface/transport_dib.h"
6 6
7 #include <stddef.h>
8 #include <stdint.h>
7 #include <sys/stat.h> 9 #include <sys/stat.h>
8 #include <unistd.h> 10 #include <unistd.h>
9 11
10 #include "base/logging.h" 12 #include "base/logging.h"
11 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/shared_memory.h" 14 #include "base/memory/shared_memory.h"
15 #include "build/build_config.h"
13 #include "skia/ext/platform_canvas.h" 16 #include "skia/ext/platform_canvas.h"
14 17
15 TransportDIB::TransportDIB() 18 TransportDIB::TransportDIB()
16 : size_(0) { 19 : size_(0) {
17 } 20 }
18 21
19 TransportDIB::TransportDIB(TransportDIB::Handle dib) 22 TransportDIB::TransportDIB(TransportDIB::Handle dib)
20 : shared_memory_(dib, false /* read write */), 23 : shared_memory_(dib, false /* read write */),
21 size_(0) { 24 size_(0) {
22 } 25 }
23 26
24 TransportDIB::~TransportDIB() { 27 TransportDIB::~TransportDIB() {
25 } 28 }
26 29
27 // static 30 // static
28 TransportDIB* TransportDIB::Create(size_t size, uint32 sequence_num) { 31 TransportDIB* TransportDIB::Create(size_t size, uint32_t sequence_num) {
29 TransportDIB* dib = new TransportDIB; 32 TransportDIB* dib = new TransportDIB;
30 if (!dib->shared_memory_.CreateAndMapAnonymous(size)) { 33 if (!dib->shared_memory_.CreateAndMapAnonymous(size)) {
31 delete dib; 34 delete dib;
32 return NULL; 35 return NULL;
33 } 36 }
34 37
35 dib->size_ = size; 38 dib->size_ = size;
36 return dib; 39 return dib;
37 } 40 }
38 41
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 return false; 84 return false;
82 85
83 size_ = size; 86 size_ = size;
84 #endif 87 #endif
85 return true; 88 return true;
86 } 89 }
87 90
88 void* TransportDIB::memory() const { 91 void* TransportDIB::memory() const {
89 return shared_memory_.memory(); 92 return shared_memory_.memory();
90 } 93 }
OLDNEW
« no previous file with comments | « ui/surface/transport_dib.h ('k') | ui/surface/transport_dib_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698