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_GPU_GPU_VIDEO_LAYER_GLX_H_ | 5 #ifndef CHROME_GPU_GPU_VIDEO_LAYER_GLX_H_ |
6 #define CHROME_GPU_GPU_VIDEO_LAYER_GLX_H_ | 6 #define CHROME_GPU_GPU_VIDEO_LAYER_GLX_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 "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 // exactly to place our quad. | 33 // exactly to place our quad. |
34 void Render(const gfx::Size& viewport_size); | 34 void Render(const gfx::Size& viewport_size); |
35 | 35 |
36 // IPC::Channel::Listener implementation. | 36 // IPC::Channel::Listener implementation. |
37 virtual void OnMessageReceived(const IPC::Message& message); | 37 virtual void OnMessageReceived(const IPC::Message& message); |
38 virtual void OnChannelConnected(int32 peer_pid); | 38 virtual void OnChannelConnected(int32 peer_pid); |
39 virtual void OnChannelError(); | 39 virtual void OnChannelError(); |
40 | 40 |
41 private: | 41 private: |
42 // Message handlers. | 42 // Message handlers. |
43 void OnPaintToVideoLayer(base::ProcessId source_process_id, | 43 void OnPaintToVideoLayer(TransportDIB::Handle dib_handle, |
44 TransportDIB::Id id, | |
45 const gfx::Rect& bitmap_rect); | 44 const gfx::Rect& bitmap_rect); |
46 | 45 |
47 // Calculates vertices for |object| relative to |world|, where |world| is | 46 // Calculates vertices for |object| relative to |world|, where |world| is |
48 // assumed to represent a full-screen quad. |vertices| should be an array of | 47 // assumed to represent a full-screen quad. |vertices| should be an array of |
49 // 8 floats. | 48 // 8 floats. |
50 // | 49 // |
51 // TODO(scherkus): not sure how to describe what this does. | 50 // TODO(scherkus): not sure how to describe what this does. |
52 static void CalculateVertices(const gfx::Size& world, | 51 static void CalculateVertices(const gfx::Size& world, |
53 const gfx::Rect& object, | 52 const gfx::Rect& object, |
54 float* vertices); | 53 float* vertices); |
(...skipping 15 matching lines...) Expand all Loading... |
70 // 3 textures, one for each plane. | 69 // 3 textures, one for each plane. |
71 unsigned int textures_[3]; | 70 unsigned int textures_[3]; |
72 | 71 |
73 // Shader program for YUV->RGB conversion. | 72 // Shader program for YUV->RGB conversion. |
74 unsigned int program_; | 73 unsigned int program_; |
75 | 74 |
76 DISALLOW_COPY_AND_ASSIGN(GpuVideoLayerGLX); | 75 DISALLOW_COPY_AND_ASSIGN(GpuVideoLayerGLX); |
77 }; | 76 }; |
78 | 77 |
79 #endif // CHROME_GPU_GPU_VIDEO_LAYER_GLX_H_ | 78 #endif // CHROME_GPU_GPU_VIDEO_LAYER_GLX_H_ |
OLD | NEW |