| 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_COMMAND_BUFFER_STUB_H_ | 5 #ifndef CHROME_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 6 #define CHROME_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 6 #define CHROME_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #if defined(ENABLE_GPU) | 9 #if defined(ENABLE_GPU) |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 | 24 |
| 25 class GpuCommandBufferStub | 25 class GpuCommandBufferStub |
| 26 : public IPC::Channel::Listener, | 26 : public IPC::Channel::Listener, |
| 27 public IPC::Message::Sender, | 27 public IPC::Message::Sender, |
| 28 public base::SupportsWeakPtr<GpuCommandBufferStub> { | 28 public base::SupportsWeakPtr<GpuCommandBufferStub> { |
| 29 public: | 29 public: |
| 30 GpuCommandBufferStub(GpuChannel* channel, | 30 GpuCommandBufferStub(GpuChannel* channel, |
| 31 gfx::PluginWindowHandle handle, | 31 gfx::PluginWindowHandle handle, |
| 32 GpuCommandBufferStub* parent, | 32 GpuCommandBufferStub* parent, |
| 33 const gfx::Size& size, | 33 const gfx::Size& size, |
| 34 const gpu::gles2::DisallowedExtensions& disallowed, |
| 34 const std::string& allowed_extensions, | 35 const std::string& allowed_extensions, |
| 35 const std::vector<int32>& attribs, | 36 const std::vector<int32>& attribs, |
| 36 uint32 parent_texture_id, | 37 uint32 parent_texture_id, |
| 37 int32 route_id, | 38 int32 route_id, |
| 38 int32 renderer_id, | 39 int32 renderer_id, |
| 39 int32 render_view_id); | 40 int32 render_view_id); |
| 40 | 41 |
| 41 virtual ~GpuCommandBufferStub(); | 42 virtual ~GpuCommandBufferStub(); |
| 42 | 43 |
| 43 // IPC::Channel::Listener implementation: | 44 // IPC::Channel::Listener implementation: |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 void ResizeCallback(gfx::Size size); | 100 void ResizeCallback(gfx::Size size); |
| 100 | 101 |
| 101 // The lifetime of objects of this class is managed by a GpuChannel. The | 102 // The lifetime of objects of this class is managed by a GpuChannel. The |
| 102 // GpuChannels destroy all the GpuCommandBufferStubs that they own when they | 103 // GpuChannels destroy all the GpuCommandBufferStubs that they own when they |
| 103 // are destroyed. So a raw pointer is safe. | 104 // are destroyed. So a raw pointer is safe. |
| 104 GpuChannel* channel_; | 105 GpuChannel* channel_; |
| 105 | 106 |
| 106 gfx::PluginWindowHandle handle_; | 107 gfx::PluginWindowHandle handle_; |
| 107 base::WeakPtr<GpuCommandBufferStub> parent_; | 108 base::WeakPtr<GpuCommandBufferStub> parent_; |
| 108 gfx::Size initial_size_; | 109 gfx::Size initial_size_; |
| 110 gpu::gles2::DisallowedExtensions disallowed_extensions_; |
| 109 std::string allowed_extensions_; | 111 std::string allowed_extensions_; |
| 110 std::vector<int32> requested_attribs_; | 112 std::vector<int32> requested_attribs_; |
| 111 uint32 parent_texture_id_; | 113 uint32 parent_texture_id_; |
| 112 int32 route_id_; | 114 int32 route_id_; |
| 113 | 115 |
| 114 #if defined(OS_WIN) | 116 #if defined(OS_WIN) |
| 115 HWND compositor_window_; | 117 HWND compositor_window_; |
| 116 #endif // defined(OS_WIN) | 118 #endif // defined(OS_WIN) |
| 117 | 119 |
| 118 // The following two fields are used on Mac OS X to identify the window | 120 // The following two fields are used on Mac OS X to identify the window |
| 119 // for the rendering results on the browser side. | 121 // for the rendering results on the browser side. |
| 120 int32 renderer_id_; | 122 int32 renderer_id_; |
| 121 int32 render_view_id_; | 123 int32 render_view_id_; |
| 122 | 124 |
| 123 scoped_ptr<gpu::CommandBufferService> command_buffer_; | 125 scoped_ptr<gpu::CommandBufferService> command_buffer_; |
| 124 scoped_ptr<gpu::GPUProcessor> processor_; | 126 scoped_ptr<gpu::GPUProcessor> processor_; |
| 125 | 127 |
| 126 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 128 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 127 }; | 129 }; |
| 128 | 130 |
| 129 #endif // defined(ENABLE_GPU) | 131 #endif // defined(ENABLE_GPU) |
| 130 | 132 |
| 131 #endif // CHROME_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 133 #endif // CHROME_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |