| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GPU_COMMAND_BUFFER_STUB_H_ | 5 #ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 6 #define CONTENT_COMMON_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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 class GpuCommandBufferStub | 79 class GpuCommandBufferStub |
| 80 : public GpuCommandBufferStubBase, | 80 : public GpuCommandBufferStubBase, |
| 81 public IPC::Channel::Listener, | 81 public IPC::Channel::Listener, |
| 82 public IPC::Message::Sender, | 82 public IPC::Message::Sender, |
| 83 public base::SupportsWeakPtr<GpuCommandBufferStub> { | 83 public base::SupportsWeakPtr<GpuCommandBufferStub> { |
| 84 public: | 84 public: |
| 85 class DestructionObserver { | 85 class DestructionObserver { |
| 86 public: | 86 public: |
| 87 ~DestructionObserver() {} | |
| 88 | |
| 89 // Called in Destroy(), before the context/surface are released. | 87 // Called in Destroy(), before the context/surface are released. |
| 90 virtual void OnWillDestroyStub(GpuCommandBufferStub* stub) = 0; | 88 virtual void OnWillDestroyStub(GpuCommandBufferStub* stub) = 0; |
| 89 |
| 90 protected: |
| 91 virtual ~DestructionObserver() {} |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 GpuCommandBufferStub( | 94 GpuCommandBufferStub( |
| 94 GpuChannel* channel, | 95 GpuChannel* channel, |
| 95 GpuCommandBufferStub* share_group, | 96 GpuCommandBufferStub* share_group, |
| 96 const gfx::GLSurfaceHandle& handle, | 97 const gfx::GLSurfaceHandle& handle, |
| 97 gpu::gles2::MailboxManager* mailbox_manager, | 98 gpu::gles2::MailboxManager* mailbox_manager, |
| 98 const gfx::Size& size, | 99 const gfx::Size& size, |
| 99 const gpu::gles2::DisallowedFeatures& disallowed_features, | 100 const gpu::gles2::DisallowedFeatures& disallowed_features, |
| 100 const std::string& allowed_extensions, | 101 const std::string& allowed_extensions, |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 IDMap<GpuVideoDecodeAccelerator, IDMapOwnPointer> video_decoders_; | 255 IDMap<GpuVideoDecodeAccelerator, IDMapOwnPointer> video_decoders_; |
| 255 | 256 |
| 256 ObserverList<DestructionObserver> destruction_observers_; | 257 ObserverList<DestructionObserver> destruction_observers_; |
| 257 | 258 |
| 258 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 259 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 259 }; | 260 }; |
| 260 | 261 |
| 261 #endif // defined(ENABLE_GPU) | 262 #endif // defined(ENABLE_GPU) |
| 262 | 263 |
| 263 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 264 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |