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

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

Issue 1406153004: components/mus/public/interfaces View => Window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet another rebase 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 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"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 virtual ~Client(); 42 virtual ~Client();
43 virtual void DidLoseContext() = 0; 43 virtual void DidLoseContext() = 0;
44 }; 44 };
45 explicit CommandBufferDriver(scoped_refptr<GpuState> gpu_state); 45 explicit CommandBufferDriver(scoped_refptr<GpuState> gpu_state);
46 46
47 ~CommandBufferDriver(); 47 ~CommandBufferDriver();
48 48
49 void set_client(scoped_ptr<Client> client) { client_ = client.Pass(); } 49 void set_client(scoped_ptr<Client> client) { client_ = client.Pass(); }
50 50
51 void Initialize( 51 void Initialize(
52 mojo::InterfacePtrInfo<mojo::CommandBufferSyncClient> sync_client, 52 mojo::InterfacePtrInfo<mojom::CommandBufferSyncClient> sync_client,
53 mojo::InterfacePtrInfo<mojo::CommandBufferLostContextObserver> 53 mojo::InterfacePtrInfo<mojom::CommandBufferLostContextObserver>
54 loss_observer, 54 loss_observer,
55 mojo::ScopedSharedBufferHandle shared_state, 55 mojo::ScopedSharedBufferHandle shared_state,
56 mojo::Array<int32_t> attribs); 56 mojo::Array<int32_t> attribs);
57 void SetGetBuffer(int32_t buffer); 57 void SetGetBuffer(int32_t buffer);
58 void Flush(int32_t put_offset); 58 void Flush(int32_t put_offset);
59 void MakeProgress(int32_t last_get_offset); 59 void MakeProgress(int32_t last_get_offset);
60 void RegisterTransferBuffer(int32_t id, 60 void RegisterTransferBuffer(int32_t id,
61 mojo::ScopedSharedBufferHandle transfer_buffer, 61 mojo::ScopedSharedBufferHandle transfer_buffer,
62 uint32_t size); 62 uint32_t size);
63 void DestroyTransferBuffer(int32_t id); 63 void DestroyTransferBuffer(int32_t id);
(...skipping 15 matching lines...) Expand all
79 void OnFenceSyncRelease(uint64_t release); 79 void OnFenceSyncRelease(uint64_t release);
80 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id, 80 bool OnWaitFenceSync(gpu::CommandBufferNamespace namespace_id,
81 uint64_t command_buffer_id, 81 uint64_t command_buffer_id,
82 uint64_t release); 82 uint64_t release);
83 void OnSyncPointRetired(); 83 void OnSyncPointRetired();
84 void OnParseError(); 84 void OnParseError();
85 void OnContextLost(uint32_t reason); 85 void OnContextLost(uint32_t reason);
86 void DestroyDecoder(); 86 void DestroyDecoder();
87 87
88 scoped_ptr<Client> client_; 88 scoped_ptr<Client> client_;
89 mojo::CommandBufferSyncClientPtr sync_client_; 89 mojom::CommandBufferSyncClientPtr sync_client_;
90 mojo::CommandBufferLostContextObserverPtr loss_observer_; 90 mojom::CommandBufferLostContextObserverPtr loss_observer_;
91 scoped_ptr<gpu::CommandBufferService> command_buffer_; 91 scoped_ptr<gpu::CommandBufferService> command_buffer_;
92 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; 92 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_;
93 scoped_ptr<gpu::GpuScheduler> scheduler_; 93 scoped_ptr<gpu::GpuScheduler> scheduler_;
94 scoped_refptr<gfx::GLContext> context_; 94 scoped_refptr<gfx::GLContext> context_;
95 scoped_refptr<gfx::GLSurface> surface_; 95 scoped_refptr<gfx::GLSurface> surface_;
96 scoped_refptr<GpuState> gpu_state_; 96 scoped_refptr<GpuState> gpu_state_;
97 97
98 scoped_refptr<base::SingleThreadTaskRunner> context_lost_task_runner_; 98 scoped_refptr<base::SingleThreadTaskRunner> context_lost_task_runner_;
99 base::Callback<void(int32_t)> context_lost_callback_; 99 base::Callback<void(int32_t)> context_lost_callback_;
100 100
101 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; 101 base::WeakPtrFactory<CommandBufferDriver> weak_factory_;
102 102
103 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); 103 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver);
104 }; 104 };
105 105
106 } // namespace mus 106 } // namespace mus
107 107
108 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_ 108 #endif // COMPONENTS_GLES2_COMMAND_BUFFER_DRIVER_H_
OLDNEW
« no previous file with comments | « components/mus/example/wm/window_manager_impl.cc ('k') | components/mus/gles2/command_buffer_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698