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

Side by Side Diff: gpu/command_buffer/tests/gl_manager.h

Issue 11275120: Virtual GL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ 5 #ifndef GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_
6 #define GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ 6 #define GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "ui/gfx/size.h" 10 #include "ui/gfx/size.h"
(...skipping 22 matching lines...) Expand all
33 class ShareGroup; 33 class ShareGroup;
34 34
35 }; 35 };
36 36
37 class GLManager { 37 class GLManager {
38 public: 38 public:
39 GLManager(); 39 GLManager();
40 ~GLManager(); 40 ~GLManager();
41 41
42 void Initialize(const gfx::Size& size); 42 void Initialize(const gfx::Size& size);
43 void InitializeVirtual(const gfx::Size& size, GLManager* real_gl_manager);
43 void InitializeShared(const gfx::Size& size, GLManager* gl_manager); 44 void InitializeShared(const gfx::Size& size, GLManager* gl_manager);
44 void InitializeSharedMailbox(const gfx::Size& size, GLManager* gl_manager); 45 void InitializeSharedMailbox(const gfx::Size& size, GLManager* gl_manager);
45 void Destroy(); 46 void Destroy();
46 47
47 void MakeCurrent(); 48 void MakeCurrent();
48 49
49 gles2::MailboxManager* mailbox_manager() const { 50 gles2::MailboxManager* mailbox_manager() const {
50 return mailbox_manager_.get(); 51 return mailbox_manager_.get();
51 } 52 }
52 53
53 gfx::GLShareGroup* share_group() const { 54 gfx::GLShareGroup* share_group() const {
54 return share_group_.get(); 55 return share_group_.get();
55 } 56 }
56 57
57 gles2::GLES2Implementation* gles2_implementation() const { 58 gles2::GLES2Implementation* gles2_implementation() const {
58 return gles2_implementation_.get(); 59 return gles2_implementation_.get();
59 } 60 }
60 61
62 gfx::GLContext* context() {
63 return context_.get();
64 }
65
61 private: 66 private:
62 void Setup( 67 void Setup(
63 const gfx::Size& size, 68 const gfx::Size& size,
64 gles2::MailboxManager* mailbox_manager, 69 gles2::MailboxManager* mailbox_manager,
65 gfx::GLShareGroup* share_group, 70 gfx::GLShareGroup* share_group,
66 gles2::ContextGroup* context_group, 71 gles2::ContextGroup* context_group,
67 gles2::ShareGroup* client_share_group); 72 gles2::ShareGroup* client_share_group,
73 gfx::GLContext* real_gl_context);
68 void PumpCommands(); 74 void PumpCommands();
69 bool GetBufferChanged(int32 transfer_buffer_id); 75 bool GetBufferChanged(int32 transfer_buffer_id);
70 76
71 scoped_refptr<gles2::MailboxManager> mailbox_manager_; 77 scoped_refptr<gles2::MailboxManager> mailbox_manager_;
72 scoped_refptr<gfx::GLShareGroup> share_group_; 78 scoped_refptr<gfx::GLShareGroup> share_group_;
73 scoped_ptr<CommandBufferService> command_buffer_; 79 scoped_ptr<CommandBufferService> command_buffer_;
74 scoped_ptr<gles2::GLES2Decoder> decoder_; 80 scoped_ptr<gles2::GLES2Decoder> decoder_;
75 scoped_ptr<GpuScheduler> gpu_scheduler_; 81 scoped_ptr<GpuScheduler> gpu_scheduler_;
76 scoped_refptr<gfx::GLSurface> surface_; 82 scoped_refptr<gfx::GLSurface> surface_;
77 scoped_refptr<gfx::GLContext> context_; 83 scoped_refptr<gfx::GLContext> context_;
78 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_; 84 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_;
79 scoped_ptr<TransferBuffer> transfer_buffer_; 85 scoped_ptr<TransferBuffer> transfer_buffer_;
80 scoped_ptr<gles2::GLES2Implementation> gles2_implementation_; 86 scoped_ptr<gles2::GLES2Implementation> gles2_implementation_;
81 }; 87 };
82 88
83 } // namespace gpu 89 } // namespace gpu
84 90
85 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ 91 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/vertex_attrib_manager.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698