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