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

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

Issue 7669002: Introduction of parameter to readBackFramebuffer set of APIs to allow reading from the currently ... (Closed) Base URL: svn://svn.chromium.org/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
« no previous file with comments | « webkit/gpu/webgraphicscontext3d_in_process_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, bound_fbo_); 639 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, bound_fbo_);
640 640
641 #ifdef FLIP_FRAMEBUFFER_VERTICALLY 641 #ifdef FLIP_FRAMEBUFFER_VERTICALLY
642 if (pixels) 642 if (pixels)
643 FlipVertically(pixels, width, height); 643 FlipVertically(pixels, width, height);
644 #endif 644 #endif
645 645
646 return true; 646 return true;
647 } 647 }
648 648
649 #if 1
649 bool WebGraphicsContext3DInProcessImpl::readBackFramebuffer( 650 bool WebGraphicsContext3DInProcessImpl::readBackFramebuffer(
650 unsigned char* pixels, size_t bufferSize) { 651 unsigned char* pixels, size_t bufferSize, bool bindDefaultFramebuffer) {
651 return readBackFramebuffer(pixels, bufferSize, fbo_, width(), height()); 652 if (bindDefaultFramebuffer)
653 return readBackFramebuffer(pixels, bufferSize, fbo_, width(), height());
654
655 return readBackFramebuffer(pixels, bufferSize, bound_fbo_, width(), height());
652 } 656 }
657 #endif
653 658
654 void WebGraphicsContext3DInProcessImpl::synthesizeGLError(WGC3Denum error) { 659 void WebGraphicsContext3DInProcessImpl::synthesizeGLError(WGC3Denum error) {
655 if (synthetic_errors_set_.find(error) == synthetic_errors_set_.end()) { 660 if (synthetic_errors_set_.find(error) == synthetic_errors_set_.end()) {
656 synthetic_errors_set_.insert(error); 661 synthetic_errors_set_.insert(error);
657 synthetic_errors_list_.push_back(error); 662 synthetic_errors_list_.push_back(error);
658 } 663 }
659 } 664 }
660 665
661 void* WebGraphicsContext3DInProcessImpl::mapBufferSubDataCHROMIUM( 666 void* WebGraphicsContext3DInProcessImpl::mapBufferSubDataCHROMIUM(
662 WGC3Denum target, WGC3Dintptr offset, 667 WGC3Denum target, WGC3Dintptr offset,
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after
1628 if (length > 1) { 1633 if (length > 1) {
1629 entry->translated_source.reset(new char[length]); 1634 entry->translated_source.reset(new char[length]);
1630 ShGetObjectCode(compiler, entry->translated_source.get()); 1635 ShGetObjectCode(compiler, entry->translated_source.get());
1631 } 1636 }
1632 entry->is_valid = true; 1637 entry->is_valid = true;
1633 return true; 1638 return true;
1634 } 1639 }
1635 1640
1636 } // namespace gpu 1641 } // namespace gpu
1637 } // namespace webkit 1642 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/gpu/webgraphicscontext3d_in_process_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698