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

Side by Side Diff: gpu/blink/webgraphicscontext3d_impl.cc

Issue 1790753002: Expose GLES2Interface to blink, and delete isContextLost() from WGC3D. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wgc3d: deps-for-tests Created 4 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
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 #include "gpu/blink/webgraphicscontext3d_impl.h" 5 #include "gpu/blink/webgraphicscontext3d_impl.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/atomicops.h" 9 #include "base/atomicops.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 gl_->VertexAttribIPointer( 1209 gl_->VertexAttribIPointer(
1210 index, size, type, stride, 1210 index, size, type, stride,
1211 reinterpret_cast<void*>(static_cast<intptr_t>(offset))); 1211 reinterpret_cast<void*>(static_cast<intptr_t>(offset)));
1212 } 1212 }
1213 void WebGraphicsContext3DImpl::waitSync(WGC3Dsync sync, 1213 void WebGraphicsContext3DImpl::waitSync(WGC3Dsync sync,
1214 WGC3Dbitfield flags, 1214 WGC3Dbitfield flags,
1215 WGC3Duint64 timeout) { 1215 WGC3Duint64 timeout) {
1216 gl_->WaitSync(reinterpret_cast<GLsync>(sync), flags, timeout); 1216 gl_->WaitSync(reinterpret_cast<GLsync>(sync), flags, timeout);
1217 } 1217 }
1218 1218
1219 bool WebGraphicsContext3DImpl::isContextLost() {
1220 return getGraphicsResetStatusARB() != GL_NO_ERROR;
1221 }
1222
1223 blink::WGC3Denum WebGraphicsContext3DImpl::getGraphicsResetStatusARB() { 1219 blink::WGC3Denum WebGraphicsContext3DImpl::getGraphicsResetStatusARB() {
1224 return gl_->GetGraphicsResetStatusKHR(); 1220 return gl_->GetGraphicsResetStatusKHR();
1225 } 1221 }
1226 1222
1223 ::gpu::gles2::GLES2Interface* WebGraphicsContext3DImpl::getGLES2Interface() {
1224 return gl_;
1225 }
1226
1227 ::gpu::gles2::GLES2ImplementationErrorMessageCallback* 1227 ::gpu::gles2::GLES2ImplementationErrorMessageCallback*
1228 WebGraphicsContext3DImpl::getErrorMessageCallback() { 1228 WebGraphicsContext3DImpl::getErrorMessageCallback() {
1229 if (!client_error_message_callback_) { 1229 if (!client_error_message_callback_) {
1230 client_error_message_callback_.reset( 1230 client_error_message_callback_.reset(
1231 new WebGraphicsContext3DErrorMessageCallback(this)); 1231 new WebGraphicsContext3DErrorMessageCallback(this));
1232 } 1232 }
1233 return client_error_message_callback_.get(); 1233 return client_error_message_callback_.get();
1234 } 1234 }
1235 1235
1236 void WebGraphicsContext3DImpl::OnErrorMessage( 1236 void WebGraphicsContext3DImpl::OnErrorMessage(
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
1301 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2; 1301 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2;
1302 break; 1302 break;
1303 default: 1303 default:
1304 NOTREACHED(); 1304 NOTREACHED();
1305 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2; 1305 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2;
1306 break; 1306 break;
1307 } 1307 }
1308 } 1308 }
1309 1309
1310 } // namespace gpu_blink 1310 } // namespace gpu_blink
OLDNEW
« no previous file with comments | « gpu/blink/webgraphicscontext3d_impl.h ('k') | gpu/blink/webgraphicscontext3d_in_process_command_buffer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698