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

Side by Side Diff: webkit/gpu/webgraphicscontext3d_in_process_impl.cc

Issue 7538008: Delete copy_texture_to_parent_texture from GPU command buffer code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
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 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
662 WGC3Denum access) { 662 WGC3Denum access) {
663 return 0; 663 return 0;
664 } 664 }
665 665
666 void WebGraphicsContext3DInProcessImpl::unmapTexSubImage2DCHROMIUM( 666 void WebGraphicsContext3DInProcessImpl::unmapTexSubImage2DCHROMIUM(
667 const void* mem) { 667 const void* mem) {
668 } 668 }
669 669
670 void WebGraphicsContext3DInProcessImpl::copyTextureToParentTextureCHROMIUM( 670 void WebGraphicsContext3DInProcessImpl::copyTextureToParentTextureCHROMIUM(
671 WebGLId id, WebGLId id2) { 671 WebGLId id, WebGLId id2) {
672 if (!glGetTexLevelParameteriv) 672 NOTIMPLEMENTED();
673 return;
674
675 makeContextCurrent();
676 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, copy_texture_to_parent_texture_fbo_);
677 glFramebufferTexture2DEXT(GL_FRAMEBUFFER,
678 GL_COLOR_ATTACHMENT0,
679 GL_TEXTURE_2D,
680 id,
681 0); // level
682 glBindTexture(GL_TEXTURE_2D, id2);
683 GLsizei width, height;
684 glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &width);
685 glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &height);
686 glCopyTexImage2D(GL_TEXTURE_2D,
687 0, // level
688 GL_RGBA,
689 0, 0, // x, y
690 width,
691 height,
692 0); // border
693 glBindTexture(GL_TEXTURE_2D, bound_texture_);
694 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, bound_fbo_);
695 } 673 }
696 674
697 WebString WebGraphicsContext3DInProcessImpl:: 675 WebString WebGraphicsContext3DInProcessImpl::
698 getRequestableExtensionsCHROMIUM() { 676 getRequestableExtensionsCHROMIUM() {
699 return WebString(); 677 return WebString();
700 } 678 }
701 679
702 void WebGraphicsContext3DInProcessImpl::requestExtensionCHROMIUM(const char*) { 680 void WebGraphicsContext3DInProcessImpl::requestExtensionCHROMIUM(const char*) {
703 } 681 }
704 682
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1638 if (length > 1) { 1616 if (length > 1) {
1639 entry->translated_source.reset(new char[length]); 1617 entry->translated_source.reset(new char[length]);
1640 ShGetObjectCode(compiler, entry->translated_source.get()); 1618 ShGetObjectCode(compiler, entry->translated_source.get());
1641 } 1619 }
1642 entry->is_valid = true; 1620 entry->is_valid = true;
1643 return true; 1621 return true;
1644 } 1622 }
1645 1623
1646 } // namespace gpu 1624 } // namespace gpu
1647 } // namespace webkit 1625 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698