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

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: Forgot to remove cmd buffer helper functios and replace with gpu control ones 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 uint32_t GenerateFenceSyncRelease() override;
77 bool IsFenceSyncRelease(uint32_t release) override;
78 bool IsFenceSyncFlushed(uint32_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);
84 void OnParseError(); 87 void OnParseError();
85 void OnContextLost(uint32_t reason); 88 void OnContextLost(uint32_t reason);
86 void OnSyncPointRetired(); 89 void OnSyncPointRetired();
87 90
88 gfx::AcceleratedWidget widget_; 91 gfx::AcceleratedWidget widget_;
89 scoped_refptr<GpuState> gpu_state_; 92 scoped_refptr<GpuState> gpu_state_;
90 scoped_ptr<gpu::CommandBufferService> command_buffer_; 93 scoped_ptr<gpu::CommandBufferService> command_buffer_;
91 scoped_ptr<gpu::GpuScheduler> scheduler_; 94 scoped_ptr<gpu::GpuScheduler> scheduler_;
92 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; 95 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_;
93 scoped_refptr<gfx::GLContext> context_; 96 scoped_refptr<gfx::GLContext> context_;
94 scoped_refptr<gfx::GLSurface> surface_; 97 scoped_refptr<gfx::GLSurface> surface_;
95 CommandBufferLocalClient* client_; 98 CommandBufferLocalClient* client_;
96 99
100 uint32_t next_fence_sync_release_;
101
97 base::WeakPtrFactory<CommandBufferLocal> weak_factory_; 102 base::WeakPtrFactory<CommandBufferLocal> weak_factory_;
98 103
99 DISALLOW_COPY_AND_ASSIGN(CommandBufferLocal); 104 DISALLOW_COPY_AND_ASSIGN(CommandBufferLocal);
100 }; 105 };
101 106
102 } // namespace mus 107 } // namespace mus
103 108
104 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_ 109 #endif // COMPONENTS_MUS_GLES2_COMMAND_BUFFER_LOCAL_H_
OLDNEW
« no previous file with comments | « no previous file | components/mus/gles2/command_buffer_local.cc » ('j') | content/common/gpu/client/command_buffer_proxy_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698