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

Side by Side Diff: components/mus/gles2/command_buffer_driver.h

Issue 1331843005: Implemented new fence syncs which replaces the old sync points. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted mojo readme, changed wait() to take a pointer Created 5 years, 2 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
« no previous file with comments | « no previous file | components/mus/gles2/command_buffer_driver.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_ 5 #ifndef COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_
6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_ 6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_DRIVER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
13 #include "base/timer/timer.h" 13 #include "base/timer/timer.h"
14 #include "components/mus/public/interfaces/command_buffer.mojom.h" 14 #include "components/mus/public/interfaces/command_buffer.mojom.h"
15 #include "gpu/command_buffer/common/constants.h"
15 #include "ui/gfx/geometry/size.h" 16 #include "ui/gfx/geometry/size.h"
16 17
17 namespace gpu { 18 namespace gpu {
18 class CommandBufferService; 19 class CommandBufferService;
19 class GpuScheduler; 20 class GpuScheduler;
20 class GpuControlService; 21 class GpuControlService;
21 namespace gles2 { 22 namespace gles2 {
22 class GLES2Decoder; 23 class GLES2Decoder;
23 } 24 }
24 } 25 }
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 int32_t format, 67 int32_t format,
67 int32_t internal_format); 68 int32_t internal_format);
68 void DestroyImage(int32_t id); 69 void DestroyImage(int32_t id);
69 70
70 private: 71 private:
71 bool MakeCurrent(); 72 bool MakeCurrent();
72 bool DoInitialize(mojo::ScopedSharedBufferHandle shared_state, 73 bool DoInitialize(mojo::ScopedSharedBufferHandle shared_state,
73 mojo::Array<int32_t> attribs); 74 mojo::Array<int32_t> attribs);
74 void OnResize(gfx::Size size, float scale_factor); 75 void OnResize(gfx::Size size, float scale_factor);
75 bool OnWaitSyncPoint(uint32_t sync_point); 76 bool OnWaitSyncPoint(uint32_t sync_point);
77 void OnFenceSyncRelease(uint64_t release);
78 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id,
79 uint64_t command_buffer_id,
80 uint64_t release);
76 void OnSyncPointRetired(); 81 void OnSyncPointRetired();
77 void OnParseError(); 82 void OnParseError();
78 void OnContextLost(uint32_t reason); 83 void OnContextLost(uint32_t reason);
79 void DestroyDecoder(); 84 void DestroyDecoder();
80 85
81 scoped_ptr<Client> client_; 86 scoped_ptr<Client> client_;
82 mojo::CommandBufferSyncClientPtr sync_client_; 87 mojo::CommandBufferSyncClientPtr sync_client_;
83 mojo::CommandBufferLostContextObserverPtr loss_observer_; 88 mojo::CommandBufferLostContextObserverPtr loss_observer_;
84 scoped_ptr<gpu::CommandBufferService> command_buffer_; 89 scoped_ptr<gpu::CommandBufferService> command_buffer_;
85 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; 90 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_;
86 scoped_ptr<gpu::GpuScheduler> scheduler_; 91 scoped_ptr<gpu::GpuScheduler> scheduler_;
87 scoped_refptr<gfx::GLContext> context_; 92 scoped_refptr<gfx::GLContext> context_;
88 scoped_refptr<gfx::GLSurface> surface_; 93 scoped_refptr<gfx::GLSurface> surface_;
89 scoped_refptr<GpuState> gpu_state_; 94 scoped_refptr<GpuState> gpu_state_;
90 95
91 scoped_refptr<base::SingleThreadTaskRunner> context_lost_task_runner_; 96 scoped_refptr<base::SingleThreadTaskRunner> context_lost_task_runner_;
92 base::Callback<void(int32_t)> context_lost_callback_; 97 base::Callback<void(int32_t)> context_lost_callback_;
93 98
94 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; 99 base::WeakPtrFactory<CommandBufferDriver> weak_factory_;
95 100
96 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); 101 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver);
97 }; 102 };
98 103
99 } // namespace mus 104 } // namespace mus
100 105
101 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_ 106 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_
OLDNEW
« no previous file with comments | « no previous file | components/mus/gles2/command_buffer_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698