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

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

Issue 1143393007: Teach GPU command buffer whether a context is webgl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 (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/containers/scoped_ptr_hash_map.h" 8 #include "base/containers/scoped_ptr_hash_map.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // If not null will share a mailbox manager with this context. 54 // If not null will share a mailbox manager with this context.
55 GLManager* share_mailbox_manager; 55 GLManager* share_mailbox_manager;
56 // If not null will create a virtual manager based on this context. 56 // If not null will create a virtual manager based on this context.
57 GLManager* virtual_manager; 57 GLManager* virtual_manager;
58 // Whether or not glBindXXX generates a resource. 58 // Whether or not glBindXXX generates a resource.
59 bool bind_generates_resource; 59 bool bind_generates_resource;
60 // Whether or not the context is auto-lost when GL_OUT_OF_MEMORY occurs. 60 // Whether or not the context is auto-lost when GL_OUT_OF_MEMORY occurs.
61 bool lose_context_when_out_of_memory; 61 bool lose_context_when_out_of_memory;
62 // Whether or not it's ok to lose the context. 62 // Whether or not it's ok to lose the context.
63 bool context_lost_allowed; 63 bool context_lost_allowed;
64 // 0 indicates not WebGL context - default.
65 // 1 indicates WebGL 1 context.
66 // 2 indicates WebGL 2 context.
67 unsigned webgl_version;
64 }; 68 };
65 GLManager(); 69 GLManager();
66 ~GLManager() override; 70 ~GLManager() override;
67 71
68 static scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer( 72 static scoped_ptr<gfx::GpuMemoryBuffer> CreateGpuMemoryBuffer(
69 const gfx::Size& size, 73 const gfx::Size& size,
70 gfx::GpuMemoryBuffer::Format format); 74 gfx::GpuMemoryBuffer::Format format);
71 75
72 void Initialize(const Options& options); 76 void Initialize(const Options& options);
73 void InitializeWithCommandLine(const Options& options, 77 void InitializeWithCommandLine(const Options& options,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Used on Android to virtualize GL for all contexts. 145 // Used on Android to virtualize GL for all contexts.
142 static int use_count_; 146 static int use_count_;
143 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; 147 static scoped_refptr<gfx::GLShareGroup>* base_share_group_;
144 static scoped_refptr<gfx::GLSurface>* base_surface_; 148 static scoped_refptr<gfx::GLSurface>* base_surface_;
145 static scoped_refptr<gfx::GLContext>* base_context_; 149 static scoped_refptr<gfx::GLContext>* base_context_;
146 }; 150 };
147 151
148 } // namespace gpu 152 } // namespace gpu
149 153
150 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ 154 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698