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_LINUX_H_ | 5 #ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_LINUX_H_ |
6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_LINUX_H_ | 6 #define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_LINUX_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #if defined(ENABLE_GPU) | 9 #if defined(ENABLE_GPU) |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 class GLES2Decoder; | 31 class GLES2Decoder; |
32 } | 32 } |
33 } | 33 } |
34 | 34 |
35 class ImageTransportSurface { | 35 class ImageTransportSurface { |
36 public: | 36 public: |
37 virtual void OnNewSurfaceACK( | 37 virtual void OnNewSurfaceACK( |
38 uint64 surface_id, TransportDIB::Handle surface_handle) = 0; | 38 uint64 surface_id, TransportDIB::Handle surface_handle) = 0; |
39 virtual void OnBuffersSwappedACK() = 0; | 39 virtual void OnBuffersSwappedACK() = 0; |
40 virtual void OnResize(gfx::Size size) = 0; | 40 virtual void OnResize(gfx::Size size) = 0; |
| 41 virtual void OnSurfaceVisible(bool visible) = 0; |
41 | 42 |
42 // Creates the appropriate surface depending on the GL implementation. | 43 // Creates the appropriate surface depending on the GL implementation. |
43 static scoped_refptr<gfx::GLSurface> | 44 static scoped_refptr<gfx::GLSurface> |
44 CreateSurface(GpuChannelManager* manager, | 45 CreateSurface(GpuChannelManager* manager, |
45 int32 render_view_id, | 46 int32 render_view_id, |
46 int32 renderer_id, | 47 int32 renderer_id, |
47 int32 command_buffer_id); | 48 int32 command_buffer_id); |
48 }; | 49 }; |
49 | 50 |
50 class ImageTransportHelper : public IPC::Channel::Listener { | 51 class ImageTransportHelper : public IPC::Channel::Listener { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 gpu::GpuScheduler* Scheduler(); | 83 gpu::GpuScheduler* Scheduler(); |
83 gpu::gles2::GLES2Decoder* Decoder(); | 84 gpu::gles2::GLES2Decoder* Decoder(); |
84 | 85 |
85 // IPC::Message handlers. | 86 // IPC::Message handlers. |
86 void OnNewSurfaceACK(uint64 surface_id, TransportDIB::Handle surface_handle); | 87 void OnNewSurfaceACK(uint64 surface_id, TransportDIB::Handle surface_handle); |
87 void OnBuffersSwappedACK(); | 88 void OnBuffersSwappedACK(); |
88 | 89 |
89 // Backbuffer resize callback. | 90 // Backbuffer resize callback. |
90 void Resize(gfx::Size size); | 91 void Resize(gfx::Size size); |
91 | 92 |
| 93 // Backbuffer visibility changed callback |
| 94 void SurfaceVisible(bool visible); |
| 95 |
92 // Weak pointers that to objects that outlive this helper. | 96 // Weak pointers that to objects that outlive this helper. |
93 ImageTransportSurface* surface_; | 97 ImageTransportSurface* surface_; |
94 GpuChannelManager* manager_; | 98 GpuChannelManager* manager_; |
95 | 99 |
96 int32 render_view_id_; | 100 int32 render_view_id_; |
97 int32 renderer_id_; | 101 int32 renderer_id_; |
98 int32 command_buffer_id_; | 102 int32 command_buffer_id_; |
99 int32 route_id_; | 103 int32 route_id_; |
100 | 104 |
101 DISALLOW_COPY_AND_ASSIGN(ImageTransportHelper); | 105 DISALLOW_COPY_AND_ASSIGN(ImageTransportHelper); |
102 }; | 106 }; |
103 | 107 |
104 #endif // defined(ENABLE_GPU) | 108 #endif // defined(ENABLE_GPU) |
105 | 109 |
106 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_LINUX_H_ | 110 #endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_LINUX_H_ |
OLD | NEW |