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

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

Issue 6282007: First pass at making the proxy handle multiple renderers. This associates the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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
« no previous file with comments | « ppapi/proxy/image_data.h ('k') | ppapi/proxy/plugin_dispatcher.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/image_data.h" 5 #include "ppapi/proxy/image_data.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <sys/shm.h> 8 #include <sys/shm.h>
9 #endif 9 #endif
10 10
11 #if defined(OS_MACOSX) 11 #if defined(OS_MACOSX)
12 #include <sys/stat.h> 12 #include <sys/stat.h>
13 #include <sys/mman.h> 13 #include <sys/mman.h>
14 #endif 14 #endif
15 15
16 namespace pp { 16 namespace pp {
17 namespace proxy { 17 namespace proxy {
18 18
19 ImageData::ImageData(const PP_ImageDataDesc& desc, ImageHandle handle) 19 ImageData::ImageData(PP_Instance instance,
20 : desc_(desc), 20 const PP_ImageDataDesc& desc,
21 ImageHandle handle)
22 : PluginResource(instance),
23 desc_(desc),
21 handle_(handle), 24 handle_(handle),
22 mapped_data_(NULL) { 25 mapped_data_(NULL) {
23 } 26 }
24 27
25 ImageData::~ImageData() { 28 ImageData::~ImageData() {
26 Unmap(); 29 Unmap();
27 } 30 }
28 31
29 ImageData* ImageData::AsImageData() { 32 ImageData* ImageData::AsImageData() {
30 return this; 33 return this;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 return reinterpret_cast<ImageHandle>(i); 88 return reinterpret_cast<ImageHandle>(i);
86 #elif defined(OS_MACOSX) 89 #elif defined(OS_MACOSX)
87 return ImageHandle(i, false); 90 return ImageHandle(i, false);
88 #else 91 #else
89 return static_cast<ImageHandle>(i); 92 return static_cast<ImageHandle>(i);
90 #endif 93 #endif
91 } 94 }
92 95
93 } // namespace proxy 96 } // namespace proxy
94 } // namespace pp 97 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/image_data.h ('k') | ppapi/proxy/plugin_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698