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

Side by Side Diff: ui/gfx/surface/transport_dib_win.cc

Issue 8585002: Give base::SharedMemory::CreateAnonymous an executable flag (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 | Annotate | Revision Log
« base/metrics/stats_table.cc ('K') | « ui/gfx/blit_unittest.cc ('k') | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/surface/transport_dib.h" 5 #include "ui/gfx/surface/transport_dib.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <limits> 9 #include <limits>
10 10
(...skipping 13 matching lines...) Expand all
24 } 24 }
25 25
26 // static 26 // static
27 TransportDIB* TransportDIB::Create(size_t size, uint32 sequence_num) { 27 TransportDIB* TransportDIB::Create(size_t size, uint32 sequence_num) {
28 size_t allocation_granularity = base::SysInfo::VMAllocationGranularity(); 28 size_t allocation_granularity = base::SysInfo::VMAllocationGranularity();
29 size = size / allocation_granularity + 1; 29 size = size / allocation_granularity + 1;
30 size = size * allocation_granularity; 30 size = size * allocation_granularity;
31 31
32 TransportDIB* dib = new TransportDIB; 32 TransportDIB* dib = new TransportDIB;
33 33
34 if (!dib->shared_memory_.CreateAnonymous(size)) { 34 if (!dib->shared_memory_.CreateAnonymous(size, false)) {
35 delete dib; 35 delete dib;
36 return NULL; 36 return NULL;
37 } 37 }
38 38
39 dib->size_ = size; 39 dib->size_ = size;
40 dib->sequence_num_ = sequence_num; 40 dib->sequence_num_ = sequence_num;
41 41
42 return dib; 42 return dib;
43 } 43 }
44 44
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 return shared_memory_.memory(); 101 return shared_memory_.memory();
102 } 102 }
103 103
104 TransportDIB::Handle TransportDIB::handle() const { 104 TransportDIB::Handle TransportDIB::handle() const {
105 return shared_memory_.handle(); 105 return shared_memory_.handle();
106 } 106 }
107 107
108 TransportDIB::Id TransportDIB::id() const { 108 TransportDIB::Id TransportDIB::id() const {
109 return Id(handle(), sequence_num_); 109 return Id(handle(), sequence_num_);
110 } 110 }
OLDNEW
« base/metrics/stats_table.cc ('K') | « ui/gfx/blit_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698