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 CHROME_BROWSER_RENDERER_HOST_VIDEO_LAYER_X_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_VIDEO_LAYER_X_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_VIDEO_LAYER_X_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_VIDEO_LAYER_X_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "app/x11_util.h" | 9 #include "app/x11_util.h" |
10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
11 #include "chrome/browser/renderer_host/video_layer.h" | 11 #include "chrome/browser/renderer_host/video_layer.h" |
12 #include "gfx/rect.h" | 12 #include "gfx/rect.h" |
13 | 13 |
14 // Implements a YUV data layer using X to hold the RGB data. | 14 // Implements a YUV data layer using X to hold the RGB data. |
15 class VideoLayerX : public VideoLayer { | 15 class VideoLayerX : public VideoLayer { |
16 public: | 16 public: |
17 VideoLayerX(RenderWidgetHost* widget, const gfx::Size& size, void* visual, | 17 VideoLayerX(RenderWidgetHost* widget, const gfx::Size& size, void* visual, |
18 int depth); | 18 int depth); |
19 virtual ~VideoLayerX(); | 19 virtual ~VideoLayerX(); |
20 | 20 |
21 // VideoLayer implementation. | 21 // VideoLayer implementation. |
22 virtual void CopyTransportDIB(RenderProcessHost* process, | 22 virtual void CopyTransportDIB(RenderProcessHost* process, |
23 TransportDIB::Id bitmap, | 23 TransportDIB::Id dib_id, |
| 24 TransportDIB::Handle dib_handle, |
24 const gfx::Rect& bitmap_rect); | 25 const gfx::Rect& bitmap_rect); |
25 | 26 |
26 // Copy from the server-side video layer to the target window. | 27 // Copy from the server-side video layer to the target window. |
27 // Unlike BackingStore, we maintain the absolute position and destination | 28 // Unlike BackingStore, we maintain the absolute position and destination |
28 // size so passing in a rect is not required. | 29 // size so passing in a rect is not required. |
29 void XShow(XID target); | 30 void XShow(XID target); |
30 | 31 |
31 private: | 32 private: |
32 // X Visual to get RGB mask information. | 33 // X Visual to get RGB mask information. |
33 void* const visual_; | 34 void* const visual_; |
(...skipping 13 matching lines...) Expand all Loading... |
47 scoped_array<uint8> rgb_frame_; | 48 scoped_array<uint8> rgb_frame_; |
48 size_t rgb_frame_size_; | 49 size_t rgb_frame_size_; |
49 | 50 |
50 // Destination size and absolution position of the converted frame. | 51 // Destination size and absolution position of the converted frame. |
51 gfx::Rect rgb_rect_; | 52 gfx::Rect rgb_rect_; |
52 | 53 |
53 DISALLOW_COPY_AND_ASSIGN(VideoLayerX); | 54 DISALLOW_COPY_AND_ASSIGN(VideoLayerX); |
54 }; | 55 }; |
55 | 56 |
56 #endif // CHROME_BROWSER_RENDERER_HOST_VIDEO_LAYER_X_H_ | 57 #endif // CHROME_BROWSER_RENDERER_HOST_VIDEO_LAYER_X_H_ |
OLD | NEW |