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

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

Issue 1160863007: DCHECK if shader compilation fails that it's due to context loss. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: glhelperlost: . 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 unsigned usage) override; 113 unsigned usage) override;
114 uint32 InsertSyncPoint() override; 114 uint32 InsertSyncPoint() override;
115 uint32 InsertFutureSyncPoint() override; 115 uint32 InsertFutureSyncPoint() override;
116 void RetireSyncPoint(uint32 sync_point) override; 116 void RetireSyncPoint(uint32 sync_point) override;
117 void SignalSyncPoint(uint32 sync_point, 117 void SignalSyncPoint(uint32 sync_point,
118 const base::Closure& callback) override; 118 const base::Closure& callback) override;
119 void SignalQuery(uint32 query, const base::Closure& callback) override; 119 void SignalQuery(uint32 query, const base::Closure& callback) override;
120 void SetSurfaceVisible(bool visible) override; 120 void SetSurfaceVisible(bool visible) override;
121 uint32 CreateStreamTexture(uint32 texture_id) override; 121 uint32 CreateStreamTexture(uint32 texture_id) override;
122 void SetLock(base::Lock*) override; 122 void SetLock(base::Lock*) override;
123 bool IsGpuChannelLost() override;
123 124
124 private: 125 private:
125 void PumpCommands(); 126 void PumpCommands();
126 bool GetBufferChanged(int32 transfer_buffer_id); 127 bool GetBufferChanged(int32 transfer_buffer_id);
127 void SetupBaseContext(); 128 void SetupBaseContext();
128 129
129 scoped_refptr<gles2::MailboxManager> mailbox_manager_; 130 scoped_refptr<gles2::MailboxManager> mailbox_manager_;
130 scoped_refptr<gfx::GLShareGroup> share_group_; 131 scoped_refptr<gfx::GLShareGroup> share_group_;
131 scoped_ptr<CommandBufferService> command_buffer_; 132 scoped_ptr<CommandBufferService> command_buffer_;
132 scoped_ptr<gles2::GLES2Decoder> decoder_; 133 scoped_ptr<gles2::GLES2Decoder> decoder_;
133 scoped_ptr<GpuScheduler> gpu_scheduler_; 134 scoped_ptr<GpuScheduler> gpu_scheduler_;
134 scoped_refptr<gfx::GLSurface> surface_; 135 scoped_refptr<gfx::GLSurface> surface_;
135 scoped_refptr<gfx::GLContext> context_; 136 scoped_refptr<gfx::GLContext> context_;
136 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_; 137 scoped_ptr<gles2::GLES2CmdHelper> gles2_helper_;
137 scoped_ptr<TransferBuffer> transfer_buffer_; 138 scoped_ptr<TransferBuffer> transfer_buffer_;
138 scoped_ptr<gles2::GLES2Implementation> gles2_implementation_; 139 scoped_ptr<gles2::GLES2Implementation> gles2_implementation_;
139 bool context_lost_allowed_; 140 bool context_lost_allowed_;
140 141
141 // Used on Android to virtualize GL for all contexts. 142 // Used on Android to virtualize GL for all contexts.
142 static int use_count_; 143 static int use_count_;
143 static scoped_refptr<gfx::GLShareGroup>* base_share_group_; 144 static scoped_refptr<gfx::GLShareGroup>* base_share_group_;
144 static scoped_refptr<gfx::GLSurface>* base_surface_; 145 static scoped_refptr<gfx::GLSurface>* base_surface_;
145 static scoped_refptr<gfx::GLContext>* base_context_; 146 static scoped_refptr<gfx::GLContext>* base_context_;
146 }; 147 };
147 148
148 } // namespace gpu 149 } // namespace gpu
149 150
150 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_ 151 #endif // GPU_COMMAND_BUFFER_TESTS_GL_MANAGER_H_
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/in_process_command_buffer.cc ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698