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

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

Issue 10695133: Improve GPU process URL crash reporting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: using net hash function instead of messing with hash_tables.h Created 8 years, 5 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
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/id_map.h" 12 #include "base/id_map.h"
13 #include "base/memory/weak_ptr.h" 13 #include "base/memory/weak_ptr.h"
14 #include "base/observer_list.h" 14 #include "base/observer_list.h"
15 #include "content/common/content_export.h" 15 #include "content/common/content_export.h"
16 #include "content/common/gpu/gpu_memory_allocation.h" 16 #include "content/common/gpu/gpu_memory_allocation.h"
17 #include "content/common/gpu/gpu_memory_allocation.h" 17 #include "content/common/gpu/gpu_memory_allocation.h"
18 #include "googleurl/src/gurl.h"
18 #include "gpu/command_buffer/common/constants.h" 19 #include "gpu/command_buffer/common/constants.h"
19 #include "gpu/command_buffer/service/command_buffer_service.h" 20 #include "gpu/command_buffer/service/command_buffer_service.h"
20 #include "gpu/command_buffer/service/context_group.h" 21 #include "gpu/command_buffer/service/context_group.h"
21 #include "gpu/command_buffer/service/gpu_scheduler.h" 22 #include "gpu/command_buffer/service/gpu_scheduler.h"
22 #include "ipc/ipc_listener.h" 23 #include "ipc/ipc_listener.h"
23 #include "ipc/ipc_sender.h" 24 #include "ipc/ipc_sender.h"
24 #include "media/base/video_decoder_config.h" 25 #include "media/base/video_decoder_config.h"
25 #include "ui/gfx/native_widget_types.h" 26 #include "ui/gfx/native_widget_types.h"
26 #include "ui/gfx/size.h" 27 #include "ui/gfx/size.h"
27 #include "ui/gl/gl_context.h" 28 #include "ui/gl/gl_context.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
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,
101 const std::vector<int32>& attribs, 102 const std::vector<int32>& attribs,
102 gfx::GpuPreference gpu_preference, 103 gfx::GpuPreference gpu_preference,
103 int32 route_id, 104 int32 route_id,
104 int32 surface_id, 105 int32 surface_id,
105 GpuWatchdog* watchdog, 106 GpuWatchdog* watchdog,
106 bool software); 107 bool software,
108 const GURL& active_url);
107 109
108 virtual ~GpuCommandBufferStub(); 110 virtual ~GpuCommandBufferStub();
109 111
110 // IPC::Listener implementation: 112 // IPC::Listener implementation:
111 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 113 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
112 114
113 // IPC::Sender implementation: 115 // IPC::Sender implementation:
114 virtual bool Send(IPC::Message* msg) OVERRIDE; 116 virtual bool Send(IPC::Message* msg) OVERRIDE;
115 117
116 // GpuCommandBufferStubBase implementation: 118 // GpuCommandBufferStubBase implementation:
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 217
216 void OnSetClientHasMemoryAllocationChangedCallback(bool); 218 void OnSetClientHasMemoryAllocationChangedCallback(bool);
217 219
218 void OnReschedule(); 220 void OnReschedule();
219 221
220 void OnCommandProcessed(); 222 void OnCommandProcessed();
221 void OnParseError(); 223 void OnParseError();
222 224
223 void ReportState(); 225 void ReportState();
224 226
227 // Wrapper for GpuScheduler::PutChanged that sets the crash report URL.
228 void PutChanged();
229
225 // Poll the command buffer to execute work. 230 // Poll the command buffer to execute work.
226 void PollWork(); 231 void PollWork();
227 232
228 // Whether this command buffer needs to be polled again in the future. 233 // Whether this command buffer needs to be polled again in the future.
229 bool HasMoreWork(); 234 bool HasMoreWork();
230 235
231 void ScheduleDelayedWork(int64 delay); 236 void ScheduleDelayedWork(int64 delay);
232 237
233 // The lifetime of objects of this class is managed by a GpuChannel. The 238 // The lifetime of objects of this class is managed by a GpuChannel. The
234 // GpuChannels destroy all the GpuCommandBufferStubs that they own when they 239 // GpuChannels destroy all the GpuCommandBufferStubs that they own when they
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 ObserverList<DestructionObserver> destruction_observers_; 277 ObserverList<DestructionObserver> destruction_observers_;
273 278
274 // A queue of sync points associated with this stub. 279 // A queue of sync points associated with this stub.
275 std::deque<uint32> sync_points_; 280 std::deque<uint32> sync_points_;
276 int sync_point_wait_count_; 281 int sync_point_wait_count_;
277 282
278 bool delayed_work_scheduled_; 283 bool delayed_work_scheduled_;
279 284
280 scoped_refptr<gpu::RefCountedCounter> preempt_by_counter_; 285 scoped_refptr<gpu::RefCountedCounter> preempt_by_counter_;
281 286
287 GURL active_url_;
288 size_t active_url_hash_;
289
282 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); 290 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub);
283 }; 291 };
284 292
285 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ 293 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698