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

Side by Side Diff: chrome/renderer/webgraphicscontext3d_command_buffer_impl.cc

Issue 6609008: Change other usages of .size() to .empty() when applicable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Peter nits Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/render_thread.cc ('k') | chrome/renderer/webplugin_delegate_proxy.cc » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #if defined(ENABLE_GPU) 5 #if defined(ENABLE_GPU)
6 6
7 #include "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h" 7 #include "chrome/renderer/webgraphicscontext3d_command_buffer_impl.h"
8 8
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #ifndef GL_GLEXT_PROTOTYPES 10 #ifndef GL_GLEXT_PROTOTYPES
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 624
625 DELEGATE_TO_GL_3(getBufferParameteriv, GetBufferParameteriv, 625 DELEGATE_TO_GL_3(getBufferParameteriv, GetBufferParameteriv,
626 WGC3Denum, WGC3Denum, WGC3Dint*) 626 WGC3Denum, WGC3Denum, WGC3Dint*)
627 627
628 WebKit::WebGraphicsContext3D::Attributes 628 WebKit::WebGraphicsContext3D::Attributes
629 WebGraphicsContext3DCommandBufferImpl::getContextAttributes() { 629 WebGraphicsContext3DCommandBufferImpl::getContextAttributes() {
630 return attributes_; 630 return attributes_;
631 } 631 }
632 632
633 WGC3Denum WebGraphicsContext3DCommandBufferImpl::getError() { 633 WGC3Denum WebGraphicsContext3DCommandBufferImpl::getError() {
634 if (synthetic_errors_.size() > 0) { 634 if (!synthetic_errors_.empty()) {
635 std::vector<WGC3Denum>::iterator iter = synthetic_errors_.begin(); 635 std::vector<WGC3Denum>::iterator iter = synthetic_errors_.begin();
636 WGC3Denum err = *iter; 636 WGC3Denum err = *iter;
637 synthetic_errors_.erase(iter); 637 synthetic_errors_.erase(iter);
638 return err; 638 return err;
639 } 639 }
640 640
641 makeContextCurrent(); 641 makeContextCurrent();
642 return glGetError(); 642 return glGetError();
643 } 643 }
644 644
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 context_lost_callback_ = cb; 1014 context_lost_callback_ = cb;
1015 } 1015 }
1016 1016
1017 void WebGraphicsContext3DCommandBufferImpl::OnContextLost() { 1017 void WebGraphicsContext3DCommandBufferImpl::OnContextLost() {
1018 if (context_lost_callback_) { 1018 if (context_lost_callback_) {
1019 context_lost_callback_->onContextLost(); 1019 context_lost_callback_->onContextLost();
1020 } 1020 }
1021 } 1021 }
1022 1022
1023 #endif // defined(ENABLE_GPU) 1023 #endif // defined(ENABLE_GPU)
OLDNEW
« no previous file with comments | « chrome/renderer/render_thread.cc ('k') | chrome/renderer/webplugin_delegate_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698