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

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

Issue 10534173: GPU Program Caching (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Style fixes, thorough tests 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
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>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/id_map.h" 13 #include "base/id_map.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/observer_list.h" 15 #include "base/observer_list.h"
16 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
17 #include "content/common/gpu/gpu_memory_allocation.h" 17 #include "content/common/gpu/gpu_memory_allocation.h"
18 #include "content/common/gpu/gpu_memory_allocation.h"
19 #include "gpu/command_buffer/common/constants.h" 18 #include "gpu/command_buffer/common/constants.h"
20 #include "gpu/command_buffer/service/command_buffer_service.h" 19 #include "gpu/command_buffer/service/command_buffer_service.h"
21 #include "gpu/command_buffer/service/context_group.h" 20 #include "gpu/command_buffer/service/context_group.h"
22 #include "gpu/command_buffer/service/gpu_scheduler.h" 21 #include "gpu/command_buffer/service/gpu_scheduler.h"
23 #include "ipc/ipc_listener.h" 22 #include "ipc/ipc_listener.h"
24 #include "ipc/ipc_sender.h" 23 #include "ipc/ipc_sender.h"
25 #include "media/base/video_decoder_config.h" 24 #include "media/base/video_decoder_config.h"
26 #include "ui/gfx/native_widget_types.h" 25 #include "ui/gfx/native_widget_types.h"
27 #include "ui/gfx/size.h" 26 #include "ui/gfx/size.h"
28 #include "ui/gl/gl_context.h" 27 #include "ui/gl/gl_context.h"
29 #include "ui/gl/gl_surface.h" 28 #include "ui/gl/gl_surface.h"
30 #include "ui/gl/gpu_preference.h" 29 #include "ui/gl/gpu_preference.h"
31 #include "ui/surface/transport_dib.h" 30 #include "ui/surface/transport_dib.h"
32 31
33 #if defined(OS_MACOSX) 32 #if defined(OS_MACOSX)
34 #include "ui/surface/accelerated_surface_mac.h" 33 #include "ui/surface/accelerated_surface_mac.h"
35 #endif 34 #endif
36 35
37 class GpuChannel; 36 class GpuChannel;
38 struct GpuMemoryAllocation; 37 struct GpuMemoryAllocation;
39 class GpuVideoDecodeAccelerator; 38 class GpuVideoDecodeAccelerator;
40 class GpuWatchdog; 39 class GpuWatchdog;
41 40
42 namespace gpu { 41 namespace gpu {
43 namespace gles2 { 42 namespace gles2 {
43 class ProgramCache;
44 class MailboxManager; 44 class MailboxManager;
45 } 45 }
46 } 46 }
47 47
48 // This Base class is used to expose methods of GpuCommandBufferStub used for 48 // This Base class is used to expose methods of GpuCommandBufferStub used for
49 // testability. 49 // testability.
50 class CONTENT_EXPORT GpuCommandBufferStubBase { 50 class CONTENT_EXPORT GpuCommandBufferStubBase {
51 public: 51 public:
52 struct CONTENT_EXPORT SurfaceState { 52 struct CONTENT_EXPORT SurfaceState {
53 int32 surface_id; 53 int32 surface_id;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 const gfx::GLSurfaceHandle& handle, 97 const gfx::GLSurfaceHandle& handle,
98 gpu::gles2::MailboxManager* mailbox_manager, 98 gpu::gles2::MailboxManager* mailbox_manager,
99 const gfx::Size& size, 99 const gfx::Size& size,
100 const gpu::gles2::DisallowedFeatures& disallowed_features, 100 const gpu::gles2::DisallowedFeatures& disallowed_features,
101 const std::string& allowed_extensions, 101 const std::string& allowed_extensions,
102 const std::vector<int32>& attribs, 102 const std::vector<int32>& attribs,
103 gfx::GpuPreference gpu_preference, 103 gfx::GpuPreference gpu_preference,
104 int32 route_id, 104 int32 route_id,
105 int32 surface_id, 105 int32 surface_id,
106 GpuWatchdog* watchdog, 106 GpuWatchdog* watchdog,
107 bool software); 107 bool software,
108 gpu::gles2::ProgramCache* program_cache);
108 109
109 virtual ~GpuCommandBufferStub(); 110 virtual ~GpuCommandBufferStub();
110 111
111 // IPC::Listener implementation: 112 // IPC::Listener implementation:
112 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; 113 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
113 114
114 // IPC::Sender implementation: 115 // IPC::Sender implementation:
115 virtual bool Send(IPC::Message* msg) OVERRIDE; 116 virtual bool Send(IPC::Message* msg) OVERRIDE;
116 117
117 // GpuCommandBufferStubBase implementation: 118 // GpuCommandBufferStubBase implementation:
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 int sync_point_wait_count_; 278 int sync_point_wait_count_;
278 279
279 bool delayed_work_scheduled_; 280 bool delayed_work_scheduled_;
280 281
281 scoped_refptr<gpu::RefCountedCounter> preempt_by_counter_; 282 scoped_refptr<gpu::RefCountedCounter> preempt_by_counter_;
282 283
283 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); 284 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub);
284 }; 285 };
285 286
286 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ 287 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698