| OLD | NEW |
| 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 #ifndef UI_GFX_SURFACE_TRANSPORT_DIB_H_ | 5 #ifndef UI_GFX_SURFACE_TRANSPORT_DIB_H_ |
| 6 #define UI_GFX_SURFACE_TRANSPORT_DIB_H_ | 6 #define UI_GFX_SURFACE_TRANSPORT_DIB_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "ui/gfx/surface/surface_export.h" |
| 10 | 11 |
| 11 #if defined(OS_WIN) || defined(OS_MACOSX) | 12 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 12 #include "base/shared_memory.h" | 13 #include "base/shared_memory.h" |
| 13 #endif | 14 #endif |
| 14 | 15 |
| 15 #if defined(OS_WIN) | 16 #if defined(OS_WIN) |
| 16 #include <windows.h> | 17 #include <windows.h> |
| 17 #elif defined(USE_X11) | 18 #elif defined(USE_X11) |
| 18 #include "ui/base/x/x11_util.h" | 19 #include "ui/base/x/x11_util.h" |
| 19 #endif | 20 #endif |
| 20 | 21 |
| 21 namespace skia { | 22 namespace skia { |
| 22 class PlatformCanvas; | 23 class PlatformCanvas; |
| 23 } | 24 } |
| 24 | 25 |
| 25 // ----------------------------------------------------------------------------- | 26 // ----------------------------------------------------------------------------- |
| 26 // A TransportDIB is a block of memory that is used to transport pixels | 27 // A TransportDIB is a block of memory that is used to transport pixels |
| 27 // between processes: from the renderer process to the browser, and | 28 // between processes: from the renderer process to the browser, and |
| 28 // between renderer and plugin processes. | 29 // between renderer and plugin processes. |
| 29 // ----------------------------------------------------------------------------- | 30 // ----------------------------------------------------------------------------- |
| 30 class TransportDIB { | 31 class SURFACE_EXPORT TransportDIB { |
| 31 public: | 32 public: |
| 32 ~TransportDIB(); | 33 ~TransportDIB(); |
| 33 | 34 |
| 34 // Two typedefs are defined. A Handle is the type which can be sent over | 35 // Two typedefs are defined. A Handle is the type which can be sent over |
| 35 // the wire so that the remote side can map the transport DIB. The Id typedef | 36 // the wire so that the remote side can map the transport DIB. The Id typedef |
| 36 // is sufficient to identify the transport DIB when you know that the remote | 37 // is sufficient to identify the transport DIB when you know that the remote |
| 37 // side already may have it mapped. | 38 // side already may have it mapped. |
| 38 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
| 39 typedef HANDLE Handle; | 40 typedef HANDLE Handle; |
| 40 // On Windows, the Id type includes a sequence number (epoch) to solve an ABA | 41 // On Windows, the Id type includes a sequence number (epoch) to solve an ABA |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 void* address_; // mapped address | 194 void* address_; // mapped address |
| 194 XSharedMemoryId x_shm_; // X id for the shared segment | 195 XSharedMemoryId x_shm_; // X id for the shared segment |
| 195 Display* display_; // connection to the X server | 196 Display* display_; // connection to the X server |
| 196 #endif | 197 #endif |
| 197 size_t size_; // length, in bytes | 198 size_t size_; // length, in bytes |
| 198 | 199 |
| 199 DISALLOW_COPY_AND_ASSIGN(TransportDIB); | 200 DISALLOW_COPY_AND_ASSIGN(TransportDIB); |
| 200 }; | 201 }; |
| 201 | 202 |
| 202 #endif // UI_GFX_SURFACE_TRANSPORT_DIB_H_ | 203 #endif // UI_GFX_SURFACE_TRANSPORT_DIB_H_ |
| OLD | NEW |