| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ | 5 #ifndef CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ |
| 6 #define CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ | 6 #define CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 #if defined(OS_WIN) | 179 #if defined(OS_WIN) |
| 180 void CreateCanvasFromHandle(const TransportDIB::Handle& dib_handle, | 180 void CreateCanvasFromHandle(const TransportDIB::Handle& dib_handle, |
| 181 const gfx::Rect& window_rect, | 181 const gfx::Rect& window_rect, |
| 182 skia::RefPtr<SkCanvas>* canvas); | 182 skia::RefPtr<SkCanvas>* canvas); |
| 183 #elif defined(OS_MACOSX) | 183 #elif defined(OS_MACOSX) |
| 184 static void CreateDIBAndCGContextFromHandle( | 184 static void CreateDIBAndCGContextFromHandle( |
| 185 const TransportDIB::Handle& dib_handle, | 185 const TransportDIB::Handle& dib_handle, |
| 186 const gfx::Rect& window_rect, | 186 const gfx::Rect& window_rect, |
| 187 scoped_ptr<TransportDIB>* dib_out, | 187 scoped_ptr<TransportDIB>* dib_out, |
| 188 base::mac::ScopedCFTypeRef<CGContextRef>* cg_context_out); | 188 base::ScopedCFTypeRef<CGContextRef>* cg_context_out); |
| 189 #elif defined(USE_X11) | 189 #elif defined(USE_X11) |
| 190 static void CreateDIBAndCanvasFromHandle( | 190 static void CreateDIBAndCanvasFromHandle( |
| 191 const TransportDIB::Handle& dib_handle, | 191 const TransportDIB::Handle& dib_handle, |
| 192 const gfx::Rect& window_rect, | 192 const gfx::Rect& window_rect, |
| 193 scoped_refptr<SharedTransportDIB>* dib_out, | 193 scoped_refptr<SharedTransportDIB>* dib_out, |
| 194 skia::RefPtr<SkCanvas>* canvas); | 194 skia::RefPtr<SkCanvas>* canvas); |
| 195 | 195 |
| 196 static void CreateShmPixmapFromDIB( | 196 static void CreateShmPixmapFromDIB( |
| 197 TransportDIB* dib, | 197 TransportDIB* dib, |
| 198 const gfx::Rect& window_rect, | 198 const gfx::Rect& window_rect, |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 GURL page_url_; | 236 GURL page_url_; |
| 237 | 237 |
| 238 // Variables used for desynchronized windowless plugin painting. See note in | 238 // Variables used for desynchronized windowless plugin painting. See note in |
| 239 // webplugin_delegate_proxy.h for how this works. The two sets of windowless_* | 239 // webplugin_delegate_proxy.h for how this works. The two sets of windowless_* |
| 240 // fields are for the front-buffer and back-buffer of a buffer flipping system | 240 // fields are for the front-buffer and back-buffer of a buffer flipping system |
| 241 // and windowless_buffer_index_ identifies which set we are using as the | 241 // and windowless_buffer_index_ identifies which set we are using as the |
| 242 // back-buffer at any given time. | 242 // back-buffer at any given time. |
| 243 int windowless_buffer_index_; | 243 int windowless_buffer_index_; |
| 244 #if defined(OS_MACOSX) | 244 #if defined(OS_MACOSX) |
| 245 scoped_ptr<TransportDIB> windowless_dibs_[2]; | 245 scoped_ptr<TransportDIB> windowless_dibs_[2]; |
| 246 base::mac::ScopedCFTypeRef<CGContextRef> windowless_contexts_[2]; | 246 base::ScopedCFTypeRef<CGContextRef> windowless_contexts_[2]; |
| 247 scoped_ptr<WebPluginAcceleratedSurfaceProxy> accelerated_surface_; | 247 scoped_ptr<WebPluginAcceleratedSurfaceProxy> accelerated_surface_; |
| 248 #else | 248 #else |
| 249 skia::RefPtr<SkCanvas> windowless_canvases_[2]; | 249 skia::RefPtr<SkCanvas> windowless_canvases_[2]; |
| 250 | 250 |
| 251 #if defined(USE_X11) | 251 #if defined(USE_X11) |
| 252 scoped_refptr<SharedTransportDIB> windowless_dibs_[2]; | 252 scoped_refptr<SharedTransportDIB> windowless_dibs_[2]; |
| 253 // If we can use SHM pixmaps for windowless plugin painting or not. | 253 // If we can use SHM pixmaps for windowless plugin painting or not. |
| 254 bool use_shm_pixmap_; | 254 bool use_shm_pixmap_; |
| 255 // The SHM pixmaps for windowless plugin painting. | 255 // The SHM pixmaps for windowless plugin painting. |
| 256 XID windowless_shm_pixmaps_[2]; | 256 XID windowless_shm_pixmaps_[2]; |
| 257 #endif | 257 #endif |
| 258 | 258 |
| 259 #endif | 259 #endif |
| 260 | 260 |
| 261 // Contains the routing id of the host render view. | 261 // Contains the routing id of the host render view. |
| 262 int host_render_view_routing_id_; | 262 int host_render_view_routing_id_; |
| 263 | 263 |
| 264 base::WeakPtrFactory<WebPluginProxy> weak_factory_; | 264 base::WeakPtrFactory<WebPluginProxy> weak_factory_; |
| 265 }; | 265 }; |
| 266 | 266 |
| 267 } // namespace content | 267 } // namespace content |
| 268 | 268 |
| 269 #endif // CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ | 269 #endif // CONTENT_PLUGIN_WEBPLUGIN_PROXY_H_ |
| OLD | NEW |