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

Side by Side Diff: ppapi/proxy/pdf_resource.cc

Issue 13529027: Switch Linux Auru ports over to POSIX SHM instead of legacy SYSV SHM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 "ppapi/proxy/pdf_resource.h" 5 #include "ppapi/proxy/pdf_resource.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 #include <string.h> 8 #include <string.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 base::SharedMemoryHandle handle; 179 base::SharedMemoryHandle handle;
180 if (!reply_params.TakeSharedMemoryHandleAtIndex(0, &handle)) 180 if (!reply_params.TakeSharedMemoryHandleAtIndex(0, &handle))
181 return 0; 181 return 0;
182 // We always succeed after this point (on non-android platforms, so we don't 182 // We always succeed after this point (on non-android platforms, so we don't
183 // have to worry about leaking |handle|. 183 // have to worry about leaking |handle|.
184 184
185 #if defined(OS_ANDROID) 185 #if defined(OS_ANDROID)
186 // This is compiled into android for tests only. 186 // This is compiled into android for tests only.
187 return 0; 187 return 0;
188 #elif defined(OS_WIN) || defined(OS_MACOSX) 188 #elif defined(TOOLKIT_GTK)
189 return (new ImageData(resource, desc, handle.fd))->GetReference();
190 #else
189 return (new ImageData(resource, desc, handle))->GetReference(); 191 return (new ImageData(resource, desc, handle))->GetReference();
190 #else
191 return (new ImageData(resource, desc, handle.fd))->GetReference();
192 #endif 192 #endif
193 } 193 }
194 194
195 PP_Resource PDFResource::GetResourceImage(PP_ResourceImage image_id) { 195 PP_Resource PDFResource::GetResourceImage(PP_ResourceImage image_id) {
196 return GetResourceImageForScale(image_id, 1.0f); 196 return GetResourceImageForScale(image_id, 1.0f);
197 } 197 }
198 198
199 } // namespace proxy 199 } // namespace proxy
200 } // namespace ppapi 200 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698