| 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 #include <deque> | 9 #include <deque> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 }; | 76 }; |
| 77 | 77 |
| 78 class GpuCommandBufferStub | 78 class GpuCommandBufferStub |
| 79 : public GpuCommandBufferStubBase, | 79 : public GpuCommandBufferStubBase, |
| 80 public IPC::Listener, | 80 public IPC::Listener, |
| 81 public IPC::Sender, | 81 public IPC::Sender, |
| 82 public base::SupportsWeakPtr<GpuCommandBufferStub> { | 82 public base::SupportsWeakPtr<GpuCommandBufferStub> { |
| 83 public: | 83 public: |
| 84 class DestructionObserver { | 84 class DestructionObserver { |
| 85 public: | 85 public: |
| 86 ~DestructionObserver() {} | |
| 87 | |
| 88 // Called in Destroy(), before the context/surface are released. | 86 // Called in Destroy(), before the context/surface are released. |
| 89 virtual void OnWillDestroyStub(GpuCommandBufferStub* stub) = 0; | 87 virtual void OnWillDestroyStub(GpuCommandBufferStub* stub) = 0; |
| 88 |
| 89 protected: |
| 90 virtual ~DestructionObserver() {} |
| 90 }; | 91 }; |
| 91 | 92 |
| 92 GpuCommandBufferStub( | 93 GpuCommandBufferStub( |
| 93 GpuChannel* channel, | 94 GpuChannel* channel, |
| 94 GpuCommandBufferStub* share_group, | 95 GpuCommandBufferStub* share_group, |
| 95 const gfx::GLSurfaceHandle& handle, | 96 const gfx::GLSurfaceHandle& handle, |
| 96 gpu::gles2::MailboxManager* mailbox_manager, | 97 gpu::gles2::MailboxManager* mailbox_manager, |
| 97 const gfx::Size& size, | 98 const gfx::Size& size, |
| 98 const gpu::gles2::DisallowedFeatures& disallowed_features, | 99 const gpu::gles2::DisallowedFeatures& disallowed_features, |
| 99 const std::string& allowed_extensions, | 100 const std::string& allowed_extensions, |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 // A queue of sync points associated with this stub. | 272 // A queue of sync points associated with this stub. |
| 272 std::deque<uint32> sync_points_; | 273 std::deque<uint32> sync_points_; |
| 273 int sync_point_wait_count_; | 274 int sync_point_wait_count_; |
| 274 | 275 |
| 275 scoped_refptr<gpu::RefCountedCounter> preempt_by_counter_; | 276 scoped_refptr<gpu::RefCountedCounter> preempt_by_counter_; |
| 276 | 277 |
| 277 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); | 278 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); |
| 278 }; | 279 }; |
| 279 | 280 |
| 280 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ | 281 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ |
| OLD | NEW |