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

Side by Side Diff: components/mus/public/interfaces/command_buffer.mojom

Issue 1686543004: mus: Modify mojo command buffer to match current chrome gpu ipc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review issues Created 4 years, 10 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 module mus.mojom; 5 module mus.mojom;
6 6
7 import "gpu/command_buffer/common/capabilities.mojom"; 7 import "gpu/command_buffer/common/capabilities.mojom";
8 import "gpu/command_buffer/common/command_buffer.mojom"; 8 import "gpu/command_buffer/common/command_buffer.mojom";
9 import "gpu/command_buffer/common/mailbox.mojom";
10 import "gpu/command_buffer/common/sync_token.mojom";
9 import "ui/mojo/geometry/geometry.mojom"; 11 import "ui/mojo/geometry/geometry.mojom";
10 12
11 struct CommandBufferInitializeResult { 13 struct CommandBufferInitializeResult {
12 int32 command_buffer_namespace; 14 int32 command_buffer_namespace;
13 uint64 command_buffer_id; 15 uint64 command_buffer_id;
14 gpu.mojom.Capabilities capabilities; 16 gpu.mojom.Capabilities capabilities;
15 }; 17 };
16 18
17 interface CommandBufferLostContextObserver { 19 interface CommandBufferClient {
18 DidLoseContext(int32 context_lost_reason); 20 Destroyed(int32 context_lost_reason,
21 int32 error);
22 SignalAck(uint32 id);
23 // TODO(penghuang): support latency_info and use gfx::SwapResult for result.
24 SwapBuffersCompleted(/* array<ui.mojom.LatencyInfo> latency_info, */
25 int32 result);
26 UpdateState(gpu.mojom.CommandBufferState state);
27 // TODO(penghuang): use base::TimeTicks & base::TimeDelta.
28 UpdateVSyncParameters(int64 timebase, int64 interval);
19 }; 29 };
20 30
21 interface CommandBuffer { 31 interface CommandBuffer {
22 // Initialize attempts to initialize the command buffer. 32 // Initialize attempts to initialize the command buffer.
23 // If the context is lost after creation the LostContext method on the 33 // If the context is lost after creation the LostContext method on the
24 // CommandBufferLostContextObserver's will be called then this pipe will be 34 // CommandBufferClient's will be called then this pipe will be
25 // closed. 35 // closed.
26 Initialize(CommandBufferLostContextObserver lost_observer, 36 Initialize(CommandBufferClient client,
27 handle<shared_buffer> shared_state, 37 handle<shared_buffer> shared_state,
28 array<int32> attribs) => (CommandBufferInitializeResult? result); 38 array<int32> attribs) => (CommandBufferInitializeResult? result);
29 SetGetBuffer(int32 buffer); 39 SetGetBuffer(int32 buffer);
30 Flush(int32 put_offset); 40 Flush(int32 put_offset);
31 MakeProgress(int32 last_get_offset) => (gpu.mojom.CommandBufferState state); 41 MakeProgress(int32 last_get_offset) => (gpu.mojom.CommandBufferState state);
32 RegisterTransferBuffer( 42 RegisterTransferBuffer(
33 int32 id, handle<shared_buffer> transfer_buffer, uint32 size); 43 int32 id, handle<shared_buffer> transfer_buffer, uint32 size);
34 DestroyTransferBuffer(int32 id); 44 DestroyTransferBuffer(int32 id);
35
36 CreateImage(int32 id, 45 CreateImage(int32 id,
37 handle memory_handle, 46 handle memory_handle,
38 int32 type, 47 int32 type,
39 mojo.Size size, 48 mojo.Size size,
40 int32 format, 49 int32 format,
41 int32 internal_format); 50 int32 internal_format);
42 DestroyImage(int32 id); 51 DestroyImage(int32 id);
52 CreateStreamTexture(uint32 client_texture_id)
53 => (int32 stream_id, bool succeeded);
54 ProduceFrontBuffer(gpu.mojom.Mailbox mailbox);
55 SignalQuery(uint32 query, uint32 signal_id);
56 SignalSyncToken(gpu.mojom.SyncToken sync_token, uint32 signal_id);
57 WaitForGetOffsetInRange(int32 start, int32 end)
58 => (gpu.mojom.CommandBufferState state);
59 WaitForTokenInRange(int32 start, int32 end)
60 => (gpu.mojom.CommandBufferState state);
43 }; 61 };
OLDNEW
« no previous file with comments | « components/mus/gles2/command_buffer_impl_observer.h ('k') | mojo/gles2/command_buffer_client_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698