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

Side by Side Diff: components/mus/gles2/command_buffer_local.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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_LOCAL_H_ 5 #ifndef COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_
6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ 6 #define COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void RetireSyncPoint(uint32 sync_point) override; 66 void RetireSyncPoint(uint32 sync_point) override;
67 void SignalSyncPoint(uint32 sync_point, 67 void SignalSyncPoint(uint32 sync_point,
68 const base::Closure& callback) override; 68 const base::Closure& callback) override;
69 void SignalQuery(uint32 query, const base::Closure& callback) override; 69 void SignalQuery(uint32 query, const base::Closure& callback) override;
70 void SetSurfaceVisible(bool visible) override; 70 void SetSurfaceVisible(bool visible) override;
71 uint32 CreateStreamTexture(uint32 texture_id) override; 71 uint32 CreateStreamTexture(uint32 texture_id) override;
72 void SetLock(base::Lock*) override; 72 void SetLock(base::Lock*) override;
73 bool IsGpuChannelLost() override; 73 bool IsGpuChannelLost() override;
74 gpu::CommandBufferNamespace GetNamespaceID() const override; 74 gpu::CommandBufferNamespace GetNamespaceID() const override;
75 uint64_t GetCommandBufferID() const override; 75 uint64_t GetCommandBufferID() const override;
76 uint64_t GenerateFenceSyncRelease() override;
77 bool IsFenceSyncRelease(uint64_t release) override;
78 bool IsFenceSyncFlushed(uint64_t release) override;
76 79
77 private: 80 private:
78 void PumpCommands(); 81 void PumpCommands();
79 82
80 void OnResize(gfx::Size size, float scale_factor); 83 void OnResize(gfx::Size size, float scale_factor);
81 void OnUpdateVSyncParameters(const base::TimeTicks timebase, 84 void OnUpdateVSyncParameters(const base::TimeTicks timebase,
82 const base::TimeDelta interval); 85 const base::TimeDelta interval);
83 bool OnWaitSyncPoint(uint32_t sync_point); 86 bool OnWaitSyncPoint(uint32_t sync_point);
87 void OnFenceSyncRelease(uint64_t release);
88 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id,
89 uint64_t command_buffer_id,
90 uint64_t release);
84 void OnParseError(); 91 void OnParseError();
85 void OnContextLost(uint32_t reason); 92 void OnContextLost(uint32_t reason);
86 void OnSyncPointRetired(); 93 void OnSyncPointRetired();
87 94
88 gfx::AcceleratedWidget widget_; 95 gfx::AcceleratedWidget widget_;
89 scoped_refptr<GpuState> gpu_state_; 96 scoped_refptr<GpuState> gpu_state_;
90 scoped_ptr<gpu::CommandBufferService> command_buffer_; 97 scoped_ptr<gpu::CommandBufferService> command_buffer_;
91 scoped_ptr<gpu::GpuScheduler> scheduler_; 98 scoped_ptr<gpu::GpuScheduler> scheduler_;
92 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; 99 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_;
93 scoped_refptr<gfx::GLContext> context_; 100 scoped_refptr<gfx::GLContext> context_;
94 scoped_refptr<gfx::GLSurface> surface_; 101 scoped_refptr<gfx::GLSurface> surface_;
95 CommandBufferLocalClient* client_; 102 CommandBufferLocalClient* client_;
96 103
104 uint64_t next_fence_sync_release_;
105
97 base::WeakPtrFactory<CommandBufferLocal> weak_factory_; 106 base::WeakPtrFactory<CommandBufferLocal> weak_factory_;
98 107
99 DISALLOW_COPY_AND_ASSIGN(CommandBufferLocal); 108 DISALLOW_COPY_AND_ASSIGN(CommandBufferLocal);
100 }; 109 };
101 110
102 } // namespace mus 111 } // namespace mus
103 112
104 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ 113 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_
OLDNEW
« no previous file with comments | « components/mus/gles2/command_buffer_driver.cc ('k') | components/mus/gles2/command_buffer_local.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698