Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(353)

Side by Side Diff: content/common/gpu/gpu_command_buffer_stub.h

Issue 10383262: RefCounted types should not have public destructors, delegate cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make win bot happy Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h ('k') | content/common/gpu/gpu_watchdog.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698