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

Side by Side Diff: chrome/browser/renderer_host/video_layer.h

Issue 3834003: On Windows, create a new TransportDIB::Handle struct which includes the file (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Rebase Created 10 years, 2 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
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 #ifndef CHROME_BROWSER_RENDERER_HOST_VIDEO_LAYER_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_VIDEO_LAYER_H_
6 #define CHROME_BROWSER_RENDERER_HOST_VIDEO_LAYER_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_VIDEO_LAYER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "app/surface/transport_dib.h" 9 #include "app/surface/transport_dib.h"
10 #include "gfx/size.h" 10 #include "gfx/size.h"
11 11
12 class RenderProcessHost; 12 class RenderProcessHost;
13 class RenderWidgetHost; 13 class RenderWidgetHost;
14 14
15 namespace gfx { 15 namespace gfx {
16 class Rect; 16 class Rect;
17 } 17 }
18 18
19 // Represents a layer of YUV data owned by RenderWidgetHost and composited with 19 // Represents a layer of YUV data owned by RenderWidgetHost and composited with
20 // the backing store. VideoLayer is responsible for converting to RGB as 20 // the backing store. VideoLayer is responsible for converting to RGB as
21 // needed. 21 // needed.
22 class VideoLayer { 22 class VideoLayer {
23 public: 23 public:
24 virtual ~VideoLayer(); 24 virtual ~VideoLayer();
25 25
26 RenderWidgetHost* render_widget_host() const { return render_widget_host_; } 26 RenderWidgetHost* render_widget_host() const { return render_widget_host_; }
27 const gfx::Size& size() { return size_; } 27 const gfx::Size& size() { return size_; }
28 28
29 // Copy the incoming bitmap into this video layer. |bitmap| contains YUV 29 // Copy the incoming bitmap into this video layer. The given DIB contains YUV
30 // pixel data in YV12 format and must be the same dimensions as this video 30 // pixel data in YV12 format and must be the same dimensions as this video
31 // layer. |bitmap_rect| specifies the absolute position and destination size 31 // layer. |bitmap_rect| specifies the absolute position and destination size
32 // of the bitmap on the backing store. 32 // of the bitmap on the backing store.
33 virtual void CopyTransportDIB(RenderProcessHost* process, 33 virtual void CopyTransportDIB(RenderProcessHost* process,
34 TransportDIB::Id bitmap, 34 TransportDIB::Id dib_id,
35 TransportDIB::Handle dib_handle,
35 const gfx::Rect& bitmap_rect) = 0; 36 const gfx::Rect& bitmap_rect) = 0;
36 37
37 protected: 38 protected:
38 // Can only be constructed via subclasses. 39 // Can only be constructed via subclasses.
39 VideoLayer(RenderWidgetHost* widget, const gfx::Size& size); 40 VideoLayer(RenderWidgetHost* widget, const gfx::Size& size);
40 41
41 private: 42 private:
42 // The owner of this video layer. 43 // The owner of this video layer.
43 RenderWidgetHost* render_widget_host_; 44 RenderWidgetHost* render_widget_host_;
44 45
45 // The size of the video layer. 46 // The size of the video layer.
46 gfx::Size size_; 47 gfx::Size size_;
47 48
48 DISALLOW_COPY_AND_ASSIGN(VideoLayer); 49 DISALLOW_COPY_AND_ASSIGN(VideoLayer);
49 }; 50 };
50 51
51 #endif // CHROME_BROWSER_RENDERER_HOST_VIDEO_LAYER_H_ 52 #endif // CHROME_BROWSER_RENDERER_HOST_VIDEO_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698