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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation.cc

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: gles2interface? 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 // A class to emulate GLES2 over command buffers. 5 // A class to emulate GLES2 over command buffers.
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <GLES2/gl2ext.h> 9 #include <GLES2/gl2ext.h>
10 #include <GLES2/gl2extchromium.h> 10 #include <GLES2/gl2extchromium.h>
(...skipping 4085 matching lines...) Expand 10 before | Expand all | Expand 10 after
4096 WaitForCmd(); 4096 WaitForCmd();
4097 result->CopyResult(params); 4097 result->CopyResult(params);
4098 GPU_CLIENT_LOG_CODE_BLOCK({ 4098 GPU_CLIENT_LOG_CODE_BLOCK({
4099 for (int32 i = 0; i < result->GetNumResults(); ++i) { 4099 for (int32 i = 0; i < result->GetNumResults(); ++i) {
4100 GPU_CLIENT_LOG(" " << i << ": " << result->GetData()[i]); 4100 GPU_CLIENT_LOG(" " << i << ": " << result->GetData()[i]);
4101 } 4101 }
4102 }); 4102 });
4103 CheckGLError(); 4103 CheckGLError();
4104 } 4104 }
4105 4105
4106 GLboolean GLES2Implementation::IsContextLost() {
4107 GPU_CLIENT_SINGLE_THREAD_CHECK();
4108 GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glIsContextLost()");
4109 return helper_->IsContextLost();
4110 }
4111
4106 void GLES2Implementation::Swap() { 4112 void GLES2Implementation::Swap() {
4107 SwapBuffers(); 4113 SwapBuffers();
4108 } 4114 }
4109 4115
4110 void GLES2Implementation::PartialSwapBuffers(const gfx::Rect& sub_buffer) { 4116 void GLES2Implementation::PartialSwapBuffers(const gfx::Rect& sub_buffer) {
4111 PostSubBufferCHROMIUM( 4117 PostSubBufferCHROMIUM(
4112 sub_buffer.x(), sub_buffer.y(), sub_buffer.width(), sub_buffer.height()); 4118 sub_buffer.x(), sub_buffer.y(), sub_buffer.width(), sub_buffer.height());
4113 } 4119 }
4114 4120
4115 static GLenum GetGLESOverlayTransform(gfx::OverlayTransform plane_transform) { 4121 static GLenum GetGLESOverlayTransform(gfx::OverlayTransform plane_transform) {
(...skipping 1569 matching lines...) Expand 10 before | Expand all | Expand 10 after
5685 CheckGLError(); 5691 CheckGLError();
5686 } 5692 }
5687 5693
5688 // Include the auto-generated part of this file. We split this because it means 5694 // Include the auto-generated part of this file. We split this because it means
5689 // we can easily edit the non-auto generated parts right here in this file 5695 // we can easily edit the non-auto generated parts right here in this file
5690 // instead of having to edit some template or the code generator. 5696 // instead of having to edit some template or the code generator.
5691 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h" 5697 #include "gpu/command_buffer/client/gles2_implementation_impl_autogen.h"
5692 5698
5693 } // namespace gles2 5699 } // namespace gles2
5694 } // namespace gpu 5700 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698