| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "webkit/gpu/webgraphicscontext3d_in_process_impl.h" | 5 #include "webkit/gpu/webgraphicscontext3d_in_process_impl.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 WGC3Denum access) { | 674 WGC3Denum access) { |
| 675 return 0; | 675 return 0; |
| 676 } | 676 } |
| 677 | 677 |
| 678 void WebGraphicsContext3DInProcessImpl::unmapTexSubImage2DCHROMIUM( | 678 void WebGraphicsContext3DInProcessImpl::unmapTexSubImage2DCHROMIUM( |
| 679 const void* mem) { | 679 const void* mem) { |
| 680 } | 680 } |
| 681 | 681 |
| 682 void WebGraphicsContext3DInProcessImpl::copyTextureToParentTextureCHROMIUM( | 682 void WebGraphicsContext3DInProcessImpl::copyTextureToParentTextureCHROMIUM( |
| 683 WebGLId id, WebGLId id2) { | 683 WebGLId id, WebGLId id2) { |
| 684 if (!glGetTexLevelParameteriv) | 684 NOTIMPLEMENTED(); |
| 685 return; | |
| 686 | |
| 687 makeContextCurrent(); | |
| 688 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, copy_texture_to_parent_texture_fbo_); | |
| 689 glFramebufferTexture2DEXT(GL_FRAMEBUFFER, | |
| 690 GL_COLOR_ATTACHMENT0, | |
| 691 GL_TEXTURE_2D, | |
| 692 id, | |
| 693 0); // level | |
| 694 glBindTexture(GL_TEXTURE_2D, id2); | |
| 695 GLsizei width, height; | |
| 696 glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width); | |
| 697 glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &height); | |
| 698 glCopyTexImage2D(GL_TEXTURE_2D, | |
| 699 0, // level | |
| 700 GL_RGBA, | |
| 701 0, 0, // x, y | |
| 702 width, | |
| 703 height, | |
| 704 0); // border | |
| 705 glBindTexture(GL_TEXTURE_2D, bound_texture_); | |
| 706 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, bound_fbo_); | |
| 707 } | 685 } |
| 708 | 686 |
| 709 WebString WebGraphicsContext3DInProcessImpl:: | 687 WebString WebGraphicsContext3DInProcessImpl:: |
| 710 getRequestableExtensionsCHROMIUM() { | 688 getRequestableExtensionsCHROMIUM() { |
| 711 return WebString(); | 689 return WebString(); |
| 712 } | 690 } |
| 713 | 691 |
| 714 void WebGraphicsContext3DInProcessImpl::requestExtensionCHROMIUM(const char*) { | 692 void WebGraphicsContext3DInProcessImpl::requestExtensionCHROMIUM(const char*) { |
| 715 } | 693 } |
| 716 | 694 |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1650 if (length > 1) { | 1628 if (length > 1) { |
| 1651 entry->translated_source.reset(new char[length]); | 1629 entry->translated_source.reset(new char[length]); |
| 1652 ShGetObjectCode(compiler, entry->translated_source.get()); | 1630 ShGetObjectCode(compiler, entry->translated_source.get()); |
| 1653 } | 1631 } |
| 1654 entry->is_valid = true; | 1632 entry->is_valid = true; |
| 1655 return true; | 1633 return true; |
| 1656 } | 1634 } |
| 1657 | 1635 |
| 1658 } // namespace gpu | 1636 } // namespace gpu |
| 1659 } // namespace webkit | 1637 } // namespace webkit |
| OLD | NEW |