OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(ENABLE_GPU) | 9 #if defined(ENABLE_GPU) |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 // The ImageTransportSurfaceHelper provides some glue to the outside world: | 45 // The ImageTransportSurfaceHelper provides some glue to the outside world: |
46 // making sure outside events reach the ImageTransportSurface and | 46 // making sure outside events reach the ImageTransportSurface and |
47 // allowing the ImageTransportSurface to send events to the outside world. | 47 // allowing the ImageTransportSurface to send events to the outside world. |
48 | 48 |
49 class ImageTransportSurface { | 49 class ImageTransportSurface { |
50 public: | 50 public: |
51 virtual void OnNewSurfaceACK( | 51 virtual void OnNewSurfaceACK( |
52 uint64 surface_id, TransportDIB::Handle surface_handle) = 0; | 52 uint64 surface_id, TransportDIB::Handle surface_handle) = 0; |
53 virtual void OnBuffersSwappedACK() = 0; | 53 virtual void OnBuffersSwappedACK() = 0; |
54 virtual void OnResize(gfx::Size size) = 0; | 54 virtual void OnResize(gfx::Size size) = 0; |
55 virtual void OnSurfaceVisible(bool visible) = 0; | |
55 | 56 |
56 // Creates the appropriate surface depending on the GL implementation. | 57 // Creates the appropriate surface depending on the GL implementation. |
57 static scoped_refptr<gfx::GLSurface> | 58 static scoped_refptr<gfx::GLSurface> |
58 CreateSurface(GpuChannelManager* manager, | 59 CreateSurface(GpuChannelManager* manager, |
59 int32 render_view_id, | 60 int32 render_view_id, |
60 int32 renderer_id, | 61 int32 renderer_id, |
61 int32 command_buffer_id, | 62 int32 command_buffer_id, |
62 gfx::PluginWindowHandle handle); | 63 gfx::PluginWindowHandle handle); |
63 }; | 64 }; |
64 | 65 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 gpu::GpuScheduler* Scheduler(); | 99 gpu::GpuScheduler* Scheduler(); |
99 gpu::gles2::GLES2Decoder* Decoder(); | 100 gpu::gles2::GLES2Decoder* Decoder(); |
100 | 101 |
101 // IPC::Message handlers. | 102 // IPC::Message handlers. |
102 void OnNewSurfaceACK(uint64 surface_id, TransportDIB::Handle surface_handle); | 103 void OnNewSurfaceACK(uint64 surface_id, TransportDIB::Handle surface_handle); |
103 void OnBuffersSwappedACK(); | 104 void OnBuffersSwappedACK(); |
104 | 105 |
105 // Backbuffer resize callback. | 106 // Backbuffer resize callback. |
106 void Resize(gfx::Size size); | 107 void Resize(gfx::Size size); |
107 | 108 |
109 // Backbuffer visibility change callback. | |
110 void SurfaceVisible(bool visible); | |
apatrick_chromium
2011/10/07 22:45:49
I'm still not clear why you want to add a new GL c
mmocny
2011/10/11 13:58:43
You are correct.
First I thought it would not be p
| |
111 | |
108 // Weak pointers that point to objects that outlive this helper. | 112 // Weak pointers that point to objects that outlive this helper. |
109 ImageTransportSurface* surface_; | 113 ImageTransportSurface* surface_; |
110 GpuChannelManager* manager_; | 114 GpuChannelManager* manager_; |
111 | 115 |
112 int32 render_view_id_; | 116 int32 render_view_id_; |
113 int32 renderer_id_; | 117 int32 renderer_id_; |
114 int32 command_buffer_id_; | 118 int32 command_buffer_id_; |
115 int32 route_id_; | 119 int32 route_id_; |
116 gfx::PluginWindowHandle handle_; | 120 gfx::PluginWindowHandle handle_; |
117 | 121 |
118 DISALLOW_COPY_AND_ASSIGN(ImageTransportHelper); | 122 DISALLOW_COPY_AND_ASSIGN(ImageTransportHelper); |
119 }; | 123 }; |
120 | 124 |
121 #endif // defined(ENABLE_GPU) | 125 #endif // defined(ENABLE_GPU) |
122 | 126 |
123 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ | 127 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_ |
OLD | NEW |