| OLD | NEW |
| 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 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 gl_->GenSyncTokenCHROMIUM(fenceSync, syncToken); | 204 gl_->GenSyncTokenCHROMIUM(fenceSync, syncToken); |
| 205 return true; | 205 return true; |
| 206 } | 206 } |
| 207 | 207 |
| 208 blink::WebString WebGraphicsContext3DImpl:: | 208 blink::WebString WebGraphicsContext3DImpl:: |
| 209 getRequestableExtensionsCHROMIUM() { | 209 getRequestableExtensionsCHROMIUM() { |
| 210 return blink::WebString::fromUTF8( | 210 return blink::WebString::fromUTF8( |
| 211 gl_->GetRequestableExtensionsCHROMIUM()); | 211 gl_->GetRequestableExtensionsCHROMIUM()); |
| 212 } | 212 } |
| 213 | 213 |
| 214 void WebGraphicsContext3DImpl::blitFramebufferCHROMIUM( | |
| 215 WGC3Dint srcX0, WGC3Dint srcY0, WGC3Dint srcX1, WGC3Dint srcY1, | |
| 216 WGC3Dint dstX0, WGC3Dint dstY0, WGC3Dint dstX1, WGC3Dint dstY1, | |
| 217 WGC3Dbitfield mask, WGC3Denum filter) { | |
| 218 gl_->BlitFramebufferCHROMIUM( | |
| 219 srcX0, srcY0, srcX1, srcY1, | |
| 220 dstX0, dstY0, dstX1, dstY1, | |
| 221 mask, filter); | |
| 222 } | |
| 223 | |
| 224 void WebGraphicsContext3DImpl::drawElements(WGC3Denum mode, | |
| 225 WGC3Dsizei count, | |
| 226 WGC3Denum type, | |
| 227 WGC3Dintptr offset) { | |
| 228 gl_->DrawElements( | |
| 229 mode, count, type, | |
| 230 reinterpret_cast<void*>(static_cast<intptr_t>(offset))); | |
| 231 } | |
| 232 | |
| 233 bool WebGraphicsContext3DImpl::getActiveAttrib( | 214 bool WebGraphicsContext3DImpl::getActiveAttrib( |
| 234 WebGLId program, WGC3Duint index, ActiveInfo& info) { | 215 WebGLId program, WGC3Duint index, ActiveInfo& info) { |
| 235 if (!program) { | 216 if (!program) { |
| 236 synthesizeGLError(GL_INVALID_VALUE); | 217 synthesizeGLError(GL_INVALID_VALUE); |
| 237 return false; | 218 return false; |
| 238 } | 219 } |
| 239 GLint max_name_length = -1; | 220 GLint max_name_length = -1; |
| 240 gl_->GetProgramiv( | 221 gl_->GetProgramiv( |
| 241 program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &max_name_length); | 222 program, GL_ACTIVE_ATTRIBUTE_MAX_LENGTH, &max_name_length); |
| 242 if (max_name_length < 0) | 223 if (max_name_length < 0) |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 blink::WebString::fromUTF8(log.get(), returnedLogLength); | 356 blink::WebString::fromUTF8(log.get(), returnedLogLength); |
| 376 return res; | 357 return res; |
| 377 } | 358 } |
| 378 | 359 |
| 379 blink::WebString WebGraphicsContext3DImpl::getString( | 360 blink::WebString WebGraphicsContext3DImpl::getString( |
| 380 WGC3Denum name) { | 361 WGC3Denum name) { |
| 381 return blink::WebString::fromUTF8( | 362 return blink::WebString::fromUTF8( |
| 382 reinterpret_cast<const char*>(gl_->GetString(name))); | 363 reinterpret_cast<const char*>(gl_->GetString(name))); |
| 383 } | 364 } |
| 384 | 365 |
| 385 void WebGraphicsContext3DImpl::getSynciv(blink::WGC3Dsync sync, | |
| 386 blink::WGC3Denum pname, | |
| 387 blink::WGC3Dsizei bufSize, | |
| 388 blink::WGC3Dsizei *length, | |
| 389 blink::WGC3Dint *params) { | |
| 390 return gl_->GetSynciv( | |
| 391 reinterpret_cast<GLsync>(sync), pname, bufSize, length, params); | |
| 392 } | |
| 393 | |
| 394 WGC3Dsizeiptr WebGraphicsContext3DImpl::getVertexAttribOffset( | |
| 395 WGC3Duint index, WGC3Denum pname) { | |
| 396 GLvoid* value = NULL; | |
| 397 // NOTE: If pname is ever a value that returns more then 1 element | |
| 398 // this will corrupt memory. | |
| 399 gl_->GetVertexAttribPointerv(index, pname, &value); | |
| 400 return static_cast<WGC3Dsizeiptr>(reinterpret_cast<intptr_t>(value)); | |
| 401 } | |
| 402 | |
| 403 void WebGraphicsContext3DImpl::shaderSource( | 366 void WebGraphicsContext3DImpl::shaderSource( |
| 404 WebGLId shader, const WGC3Dchar* string) { | 367 WebGLId shader, const WGC3Dchar* string) { |
| 405 GLint length = strlen(string); | 368 GLint length = strlen(string); |
| 406 gl_->ShaderSource(shader, 1, &string, &length); | 369 gl_->ShaderSource(shader, 1, &string, &length); |
| 407 } | 370 } |
| 408 | 371 |
| 409 void WebGraphicsContext3DImpl::vertexAttribPointer( | |
| 410 WGC3Duint index, WGC3Dint size, WGC3Denum type, WGC3Dboolean normalized, | |
| 411 WGC3Dsizei stride, WGC3Dintptr offset) { | |
| 412 gl_->VertexAttribPointer( | |
| 413 index, size, type, normalized, stride, | |
| 414 reinterpret_cast<void*>(static_cast<intptr_t>(offset))); | |
| 415 } | |
| 416 | |
| 417 WebGLId WebGraphicsContext3DImpl::createBuffer() { | 372 WebGLId WebGraphicsContext3DImpl::createBuffer() { |
| 418 GLuint o; | 373 GLuint o; |
| 419 gl_->GenBuffers(1, &o); | 374 gl_->GenBuffers(1, &o); |
| 420 return o; | 375 return o; |
| 421 } | 376 } |
| 422 | 377 |
| 423 WebGLId WebGraphicsContext3DImpl::createFramebuffer() { | 378 WebGLId WebGraphicsContext3DImpl::createFramebuffer() { |
| 424 GLuint o = 0; | 379 GLuint o = 0; |
| 425 gl_->GenFramebuffers(1, &o); | 380 gl_->GenFramebuffers(1, &o); |
| 426 return o; | 381 return o; |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 DELEGATE_TO_GL_2(bindTransformFeedback, BindTransformFeedback, WGC3Denum, | 467 DELEGATE_TO_GL_2(bindTransformFeedback, BindTransformFeedback, WGC3Denum, |
| 513 WebGLId) | 468 WebGLId) |
| 514 DELEGATE_TO_GL_4(clearBufferfi, ClearBufferfi, WGC3Denum, WGC3Dint, WGC3Dfloat, | 469 DELEGATE_TO_GL_4(clearBufferfi, ClearBufferfi, WGC3Denum, WGC3Dint, WGC3Dfloat, |
| 515 WGC3Dint) | 470 WGC3Dint) |
| 516 DELEGATE_TO_GL_3(clearBufferfv, ClearBufferfv, WGC3Denum, WGC3Dint, | 471 DELEGATE_TO_GL_3(clearBufferfv, ClearBufferfv, WGC3Denum, WGC3Dint, |
| 517 const WGC3Dfloat *) | 472 const WGC3Dfloat *) |
| 518 DELEGATE_TO_GL_3(clearBufferiv, ClearBufferiv, WGC3Denum, WGC3Dint, | 473 DELEGATE_TO_GL_3(clearBufferiv, ClearBufferiv, WGC3Denum, WGC3Dint, |
| 519 const WGC3Dint *) | 474 const WGC3Dint *) |
| 520 DELEGATE_TO_GL_3(clearBufferuiv, ClearBufferuiv, WGC3Denum, WGC3Dint, | 475 DELEGATE_TO_GL_3(clearBufferuiv, ClearBufferuiv, WGC3Denum, WGC3Dint, |
| 521 const WGC3Duint *) | 476 const WGC3Duint *) |
| 522 WGC3Denum WebGraphicsContext3DImpl::clientWaitSync(WGC3Dsync sync, | |
| 523 WGC3Dbitfield flags, | |
| 524 WGC3Duint64 timeout) { | |
| 525 return gl_->ClientWaitSync(reinterpret_cast<GLsync>(sync), flags, timeout); | |
| 526 } | |
| 527 DELEGATE_TO_GL_9(compressedTexImage3D, CompressedTexImage3D, WGC3Denum, | 477 DELEGATE_TO_GL_9(compressedTexImage3D, CompressedTexImage3D, WGC3Denum, |
| 528 WGC3Dint, WGC3Denum, WGC3Dsizei, WGC3Dsizei, WGC3Dsizei, | 478 WGC3Dint, WGC3Denum, WGC3Dsizei, WGC3Dsizei, WGC3Dsizei, |
| 529 WGC3Dint, WGC3Dsizei, const void *) | 479 WGC3Dint, WGC3Dsizei, const void *) |
| 530 DELEGATE_TO_GL_11(compressedTexSubImage3D, CompressedTexSubImage3D, WGC3Denum, | 480 DELEGATE_TO_GL_11(compressedTexSubImage3D, CompressedTexSubImage3D, WGC3Denum, |
| 531 WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, | 481 WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, |
| 532 WGC3Dsizei, WGC3Dsizei, WGC3Denum, WGC3Dsizei, const void *) | 482 WGC3Dsizei, WGC3Dsizei, WGC3Denum, WGC3Dsizei, const void *) |
| 533 DELEGATE_TO_GL_5(copyBufferSubData, CopyBufferSubData, WGC3Denum, WGC3Denum, | 483 DELEGATE_TO_GL_5(copyBufferSubData, CopyBufferSubData, WGC3Denum, WGC3Denum, |
| 534 WGC3Dintptr, WGC3Dintptr, WGC3Dsizeiptr) | 484 WGC3Dintptr, WGC3Dintptr, WGC3Dsizeiptr) |
| 535 DELEGATE_TO_GL_9(copyTexSubImage3D, CopyTexSubImage3D, WGC3Denum, WGC3Dint, | 485 DELEGATE_TO_GL_9(copyTexSubImage3D, CopyTexSubImage3D, WGC3Denum, WGC3Dint, |
| 536 WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, | 486 WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dint, WGC3Dsizei, |
| 537 WGC3Dsizei) | 487 WGC3Dsizei) |
| 538 WebGLId WebGraphicsContext3DImpl::createSampler() { | 488 WebGLId WebGraphicsContext3DImpl::createSampler() { |
| 539 GLuint sampler; | 489 GLuint sampler; |
| 540 gl_->GenSamplers(1, &sampler); | 490 gl_->GenSamplers(1, &sampler); |
| 541 return sampler; | 491 return sampler; |
| 542 } | 492 } |
| 543 WebGLId WebGraphicsContext3DImpl::createTransformFeedback() { | 493 WebGLId WebGraphicsContext3DImpl::createTransformFeedback() { |
| 544 GLuint tf; | 494 GLuint tf; |
| 545 gl_->GenTransformFeedbacks(1, &tf); | 495 gl_->GenTransformFeedbacks(1, &tf); |
| 546 return tf; | 496 return tf; |
| 547 } | 497 } |
| 548 void WebGraphicsContext3DImpl::deleteSampler(WebGLId sampler) { | 498 void WebGraphicsContext3DImpl::deleteSampler(WebGLId sampler) { |
| 549 gl_->DeleteSamplers(1, &sampler); | 499 gl_->DeleteSamplers(1, &sampler); |
| 550 } | 500 } |
| 551 void WebGraphicsContext3DImpl::deleteSync(WGC3Dsync sync) { | |
| 552 gl_->DeleteSync(reinterpret_cast<GLsync>(sync)); | |
| 553 } | |
| 554 void WebGraphicsContext3DImpl::deleteTransformFeedback(WebGLId tf) { | 501 void WebGraphicsContext3DImpl::deleteTransformFeedback(WebGLId tf) { |
| 555 gl_->DeleteTransformFeedbacks(1, &tf); | 502 gl_->DeleteTransformFeedbacks(1, &tf); |
| 556 } | 503 } |
| 557 void WebGraphicsContext3DImpl::drawRangeElements( | |
| 558 WGC3Denum mode, WGC3Duint start, WGC3Duint end, WGC3Dsizei count, | |
| 559 WGC3Denum type, WGC3Dintptr offset) { | |
| 560 gl_->DrawRangeElements(mode, start, end, count, type, | |
| 561 reinterpret_cast<void*>(static_cast<intptr_t>(offset))); | |
| 562 } | |
| 563 DELEGATE_TO_GL(endTransformFeedback, EndTransformFeedback) | 504 DELEGATE_TO_GL(endTransformFeedback, EndTransformFeedback) |
| 564 WGC3Dsync WebGraphicsContext3DImpl::fenceSync(WGC3Denum condition, | |
| 565 WGC3Dbitfield flags) { | |
| 566 return reinterpret_cast<WGC3Dsync>(gl_->FenceSync(condition, flags)); | |
| 567 } | |
| 568 DELEGATE_TO_GL_5(getActiveUniformBlockName, GetActiveUniformBlockName, | 505 DELEGATE_TO_GL_5(getActiveUniformBlockName, GetActiveUniformBlockName, |
| 569 WGC3Duint, WGC3Duint, WGC3Dsizei, WGC3Dsizei *, WGC3Dchar *) | 506 WGC3Duint, WGC3Duint, WGC3Dsizei, WGC3Dsizei *, WGC3Dchar *) |
| 570 DELEGATE_TO_GL_4(getActiveUniformBlockiv, GetActiveUniformBlockiv, WGC3Duint, | 507 DELEGATE_TO_GL_4(getActiveUniformBlockiv, GetActiveUniformBlockiv, WGC3Duint, |
| 571 WGC3Duint, WGC3Denum, WGC3Dint *) | 508 WGC3Duint, WGC3Denum, WGC3Dint *) |
| 572 DELEGATE_TO_GL_5(getActiveUniformsiv, GetActiveUniformsiv, WGC3Duint, | 509 DELEGATE_TO_GL_5(getActiveUniformsiv, GetActiveUniformsiv, WGC3Duint, |
| 573 WGC3Dsizei, const WGC3Duint *, WGC3Denum, WGC3Dint *) | 510 WGC3Dsizei, const WGC3Duint *, WGC3Denum, WGC3Dint *) |
| 574 DELEGATE_TO_GL_2R(getFragDataLocation, GetFragDataLocation, WGC3Duint, | 511 DELEGATE_TO_GL_2R(getFragDataLocation, GetFragDataLocation, WGC3Duint, |
| 575 const WGC3Dchar *, WGC3Dint) | 512 const WGC3Dchar *, WGC3Dint) |
| 576 DELEGATE_TO_GL_5(getInternalformativ, GetInternalformativ, WGC3Denum, WGC3Denum, | 513 DELEGATE_TO_GL_5(getInternalformativ, GetInternalformativ, WGC3Denum, WGC3Denum, |
| 577 WGC3Denum, WGC3Dsizei, WGC3Dint *) | 514 WGC3Denum, WGC3Dsizei, WGC3Dint *) |
| 578 DELEGATE_TO_GL_3(getSamplerParameterfv, GetSamplerParameterfv, WGC3Duint, | 515 DELEGATE_TO_GL_3(getSamplerParameterfv, GetSamplerParameterfv, WGC3Duint, |
| 579 WGC3Denum, WGC3Dfloat *) | 516 WGC3Denum, WGC3Dfloat *) |
| 580 DELEGATE_TO_GL_3(getSamplerParameteriv, GetSamplerParameteriv, WGC3Duint, | 517 DELEGATE_TO_GL_3(getSamplerParameteriv, GetSamplerParameteriv, WGC3Duint, |
| 581 WGC3Denum, WGC3Dint *) | 518 WGC3Denum, WGC3Dint *) |
| 582 DELEGATE_TO_GL_7(getTransformFeedbackVarying, GetTransformFeedbackVarying, | 519 DELEGATE_TO_GL_7(getTransformFeedbackVarying, GetTransformFeedbackVarying, |
| 583 WGC3Duint, WGC3Duint, WGC3Dsizei, WGC3Dsizei *, WGC3Dsizei *, | 520 WGC3Duint, WGC3Duint, WGC3Dsizei, WGC3Dsizei *, WGC3Dsizei *, |
| 584 WGC3Denum *, WGC3Dchar *) | 521 WGC3Denum *, WGC3Dchar *) |
| 585 DELEGATE_TO_GL_2R(getUniformBlockIndex, GetUniformBlockIndex, WGC3Duint, | 522 DELEGATE_TO_GL_2R(getUniformBlockIndex, GetUniformBlockIndex, WGC3Duint, |
| 586 const WGC3Dchar *, WGC3Duint) | 523 const WGC3Dchar *, WGC3Duint) |
| 587 DELEGATE_TO_GL_4(getUniformIndices, GetUniformIndices, WGC3Duint, WGC3Dsizei, | 524 DELEGATE_TO_GL_4(getUniformIndices, GetUniformIndices, WGC3Duint, WGC3Dsizei, |
| 588 const WGC3Dchar *const*, WGC3Duint *) | 525 const WGC3Dchar *const*, WGC3Duint *) |
| 589 DELEGATE_TO_GL_3(getUniformuiv, GetUniformuiv, WGC3Duint, WGC3Dint, | 526 DELEGATE_TO_GL_3(getUniformuiv, GetUniformuiv, WGC3Duint, WGC3Dint, |
| 590 WGC3Duint *) | 527 WGC3Duint *) |
| 591 DELEGATE_TO_GL_3(invalidateFramebuffer, InvalidateFramebuffer, WGC3Denum, | 528 DELEGATE_TO_GL_3(invalidateFramebuffer, InvalidateFramebuffer, WGC3Denum, |
| 592 WGC3Dsizei, const WGC3Denum *) | 529 WGC3Dsizei, const WGC3Denum *) |
| 593 DELEGATE_TO_GL_7(invalidateSubFramebuffer, InvalidateSubFramebuffer, WGC3Denum, | 530 DELEGATE_TO_GL_7(invalidateSubFramebuffer, InvalidateSubFramebuffer, WGC3Denum, |
| 594 WGC3Dsizei, const WGC3Denum *, WGC3Dint, WGC3Dint, WGC3Dsizei, | 531 WGC3Dsizei, const WGC3Denum *, WGC3Dint, WGC3Dint, WGC3Dsizei, |
| 595 WGC3Dsizei) | 532 WGC3Dsizei) |
| 596 DELEGATE_TO_GL_1R(isSampler, IsSampler, WebGLId, WGC3Dboolean) | 533 DELEGATE_TO_GL_1R(isSampler, IsSampler, WebGLId, WGC3Dboolean) |
| 597 WGC3Dboolean WebGraphicsContext3DImpl::isSync(WGC3Dsync sync) { | |
| 598 return gl_->IsSync(reinterpret_cast<GLsync>(sync)); | |
| 599 } | |
| 600 DELEGATE_TO_GL_1R(isTransformFeedback, IsTransformFeedback, WGC3Duint, | 534 DELEGATE_TO_GL_1R(isTransformFeedback, IsTransformFeedback, WGC3Duint, |
| 601 WGC3Dboolean) | 535 WGC3Dboolean) |
| 602 DELEGATE_TO_GL_4R(mapBufferRange, MapBufferRange, WGC3Denum, WGC3Dintptr, | 536 DELEGATE_TO_GL_4R(mapBufferRange, MapBufferRange, WGC3Denum, WGC3Dintptr, |
| 603 WGC3Dsizeiptr, WGC3Dbitfield, void*); | 537 WGC3Dsizeiptr, WGC3Dbitfield, void*); |
| 604 DELEGATE_TO_GL(pauseTransformFeedback, PauseTransformFeedback) | 538 DELEGATE_TO_GL(pauseTransformFeedback, PauseTransformFeedback) |
| 605 //DELEGATE_TO_GL_3(programParameteri, ProgramParameteri, WGC3Duint, WGC3Denum, | 539 //DELEGATE_TO_GL_3(programParameteri, ProgramParameteri, WGC3Duint, WGC3Denum, |
| 606 // WGC3Dint) | 540 // WGC3Dint) |
| 607 DELEGATE_TO_GL_1(readBuffer, ReadBuffer, WGC3Denum) | 541 DELEGATE_TO_GL_1(readBuffer, ReadBuffer, WGC3Denum) |
| 608 DELEGATE_TO_GL(resumeTransformFeedback, ResumeTransformFeedback) | 542 DELEGATE_TO_GL(resumeTransformFeedback, ResumeTransformFeedback) |
| 609 DELEGATE_TO_GL_3(samplerParameterf, SamplerParameterf, WGC3Duint, WGC3Denum, | 543 DELEGATE_TO_GL_3(samplerParameterf, SamplerParameterf, WGC3Duint, WGC3Denum, |
| 610 WGC3Dfloat) | 544 WGC3Dfloat) |
| 611 DELEGATE_TO_GL_3(samplerParameterfv, SamplerParameterfv, WGC3Duint, WGC3Denum, | 545 DELEGATE_TO_GL_3(samplerParameterfv, SamplerParameterfv, WGC3Duint, WGC3Denum, |
| 612 const WGC3Dfloat *) | 546 const WGC3Dfloat *) |
| 613 DELEGATE_TO_GL_3(samplerParameteri, SamplerParameteri, WGC3Duint, WGC3Denum, | 547 DELEGATE_TO_GL_3(samplerParameteri, SamplerParameteri, WGC3Duint, WGC3Denum, |
| 614 WGC3Dint) | 548 WGC3Dint) |
| 615 DELEGATE_TO_GL_3(samplerParameteriv, SamplerParameteriv, WGC3Duint, WGC3Denum, | 549 DELEGATE_TO_GL_3(samplerParameteriv, SamplerParameteriv, WGC3Duint, WGC3Denum, |
| 616 const WGC3Dint *) | 550 const WGC3Dint *) |
| 617 DELEGATE_TO_GL_4(transformFeedbackVaryings, TransformFeedbackVaryings, | 551 DELEGATE_TO_GL_4(transformFeedbackVaryings, TransformFeedbackVaryings, |
| 618 WGC3Duint, WGC3Dsizei, const WGC3Dchar *const*, WGC3Denum) | 552 WGC3Duint, WGC3Dsizei, const WGC3Dchar *const*, WGC3Denum) |
| 619 DELEGATE_TO_GL_1R(unmapBuffer, UnmapBuffer, WGC3Denum, WGC3Dboolean); | 553 DELEGATE_TO_GL_1R(unmapBuffer, UnmapBuffer, WGC3Denum, WGC3Dboolean); |
| 620 void WebGraphicsContext3DImpl::vertexAttribIPointer( | |
| 621 WGC3Duint index, WGC3Dint size, WGC3Denum type, WGC3Dsizei stride, | |
| 622 WGC3Dintptr offset) { | |
| 623 gl_->VertexAttribIPointer( | |
| 624 index, size, type, stride, | |
| 625 reinterpret_cast<void*>(static_cast<intptr_t>(offset))); | |
| 626 } | |
| 627 void WebGraphicsContext3DImpl::waitSync(WGC3Dsync sync, | |
| 628 WGC3Dbitfield flags, | |
| 629 WGC3Duint64 timeout) { | |
| 630 gl_->WaitSync(reinterpret_cast<GLsync>(sync), flags, timeout); | |
| 631 } | |
| 632 | 554 |
| 633 ::gpu::gles2::GLES2Interface* WebGraphicsContext3DImpl::getGLES2Interface() { | 555 ::gpu::gles2::GLES2Interface* WebGraphicsContext3DImpl::getGLES2Interface() { |
| 634 return gl_; | 556 return gl_; |
| 635 } | 557 } |
| 636 | 558 |
| 637 ::gpu::gles2::GLES2ImplementationErrorMessageCallback* | 559 ::gpu::gles2::GLES2ImplementationErrorMessageCallback* |
| 638 WebGraphicsContext3DImpl::getErrorMessageCallback() { | 560 WebGraphicsContext3DImpl::getErrorMessageCallback() { |
| 639 if (!client_error_message_callback_) { | 561 if (!client_error_message_callback_) { |
| 640 client_error_message_callback_.reset( | 562 client_error_message_callback_.reset( |
| 641 new WebGraphicsContext3DErrorMessageCallback(this)); | 563 new WebGraphicsContext3DErrorMessageCallback(this)); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 688 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2; | 610 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_WEBGL2; |
| 689 break; | 611 break; |
| 690 default: | 612 default: |
| 691 NOTREACHED(); | 613 NOTREACHED(); |
| 692 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2; | 614 output_attribs->context_type = ::gpu::gles2::CONTEXT_TYPE_OPENGLES2; |
| 693 break; | 615 break; |
| 694 } | 616 } |
| 695 } | 617 } |
| 696 | 618 |
| 697 } // namespace gpu_blink | 619 } // namespace gpu_blink |
| OLD | NEW |