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

Side by Side Diff: services/gles2/command_buffer_driver.h

Issue 940293003: Add a Display and ContextProvider concept to mojom, use to recreate (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 9 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 | « services/gles2/BUILD.gn ('k') | services/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 SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ 5 #ifndef SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_
6 #define SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ 6 #define SERVICES_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 30 matching lines...) Expand all
41 virtual void UpdateVSyncParameters(base::TimeTicks timebase, 41 virtual void UpdateVSyncParameters(base::TimeTicks timebase,
42 base::TimeDelta interval) = 0; 42 base::TimeDelta interval) = 0;
43 virtual void DidLoseContext() = 0; 43 virtual void DidLoseContext() = 0;
44 }; 44 };
45 // Offscreen. 45 // Offscreen.
46 CommandBufferDriver(gfx::GLShareGroup* share_group, 46 CommandBufferDriver(gfx::GLShareGroup* share_group,
47 gpu::gles2::MailboxManager* mailbox_manager, 47 gpu::gles2::MailboxManager* mailbox_manager,
48 gpu::SyncPointManager* sync_point_manager); 48 gpu::SyncPointManager* sync_point_manager);
49 // Onscreen. 49 // Onscreen.
50 CommandBufferDriver(gfx::AcceleratedWidget widget, 50 CommandBufferDriver(gfx::AcceleratedWidget widget,
51 const gfx::Size& size,
52 gfx::GLShareGroup* share_group, 51 gfx::GLShareGroup* share_group,
53 gpu::gles2::MailboxManager* mailbox_manager, 52 gpu::gles2::MailboxManager* mailbox_manager,
54 gpu::SyncPointManager* sync_point_manager); 53 gpu::SyncPointManager* sync_point_manager);
55 ~CommandBufferDriver(); 54 ~CommandBufferDriver();
56 55
57 void set_client(scoped_ptr<Client> client) { client_ = client.Pass(); } 56 void set_client(scoped_ptr<Client> client) { client_ = client.Pass(); }
58 57
59 void Initialize(mojo::CommandBufferSyncClientPtr sync_client, 58 void Initialize(mojo::CommandBufferSyncClientPtr sync_client,
60 mojo::CommandBufferLostContextObserverPtr loss_observer, 59 mojo::CommandBufferLostContextObserverPtr loss_observer,
61 mojo::ScopedSharedBufferHandle shared_state); 60 mojo::ScopedSharedBufferHandle shared_state);
(...skipping 13 matching lines...) Expand all
75 void OnSyncPointRetired(); 74 void OnSyncPointRetired();
76 void OnParseError(); 75 void OnParseError();
77 void OnContextLost(uint32_t reason); 76 void OnContextLost(uint32_t reason);
78 void OnUpdateVSyncParameters(const base::TimeTicks timebase, 77 void OnUpdateVSyncParameters(const base::TimeTicks timebase,
79 const base::TimeDelta interval); 78 const base::TimeDelta interval);
80 79
81 scoped_ptr<Client> client_; 80 scoped_ptr<Client> client_;
82 mojo::CommandBufferSyncClientPtr sync_client_; 81 mojo::CommandBufferSyncClientPtr sync_client_;
83 mojo::CommandBufferLostContextObserverPtr loss_observer_; 82 mojo::CommandBufferLostContextObserverPtr loss_observer_;
84 gfx::AcceleratedWidget widget_; 83 gfx::AcceleratedWidget widget_;
85 gfx::Size size_;
86 scoped_ptr<gpu::CommandBufferService> command_buffer_; 84 scoped_ptr<gpu::CommandBufferService> command_buffer_;
87 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_; 85 scoped_ptr<gpu::gles2::GLES2Decoder> decoder_;
88 scoped_ptr<gpu::GpuScheduler> scheduler_; 86 scoped_ptr<gpu::GpuScheduler> scheduler_;
89 scoped_refptr<gfx::GLContext> context_; 87 scoped_refptr<gfx::GLContext> context_;
90 scoped_refptr<gfx::GLSurface> surface_; 88 scoped_refptr<gfx::GLSurface> surface_;
91 scoped_refptr<gfx::GLShareGroup> share_group_; 89 scoped_refptr<gfx::GLShareGroup> share_group_;
92 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_; 90 scoped_refptr<gpu::gles2::MailboxManager> mailbox_manager_;
93 scoped_refptr<gpu::SyncPointManager> sync_point_manager_; 91 scoped_refptr<gpu::SyncPointManager> sync_point_manager_;
94 92
95 scoped_refptr<base::SingleThreadTaskRunner> context_lost_task_runner_; 93 scoped_refptr<base::SingleThreadTaskRunner> context_lost_task_runner_;
96 base::Callback<void(int32_t)> context_lost_callback_; 94 base::Callback<void(int32_t)> context_lost_callback_;
97 95
98 base::WeakPtrFactory<CommandBufferDriver> weak_factory_; 96 base::WeakPtrFactory<CommandBufferDriver> weak_factory_;
99 97
100 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver); 98 DISALLOW_COPY_AND_ASSIGN(CommandBufferDriver);
101 }; 99 };
102 100
103 } // namespace gles2 101 } // namespace gles2
104 102
105 #endif // SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_ 103 #endif // SERVICES_GLES2_COMMAND_BUFFER_DRIVER_H_
OLDNEW
« no previous file with comments | « services/gles2/BUILD.gn ('k') | services/gles2/command_buffer_driver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698