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

Side by Side Diff: cc/output/gl_renderer.cc

Issue 105743004: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: c301e01d Rebase. Created 6 years, 11 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 2010 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "cc/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 2200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2211 2211
2212 gpu::Mailbox mailbox; 2212 gpu::Mailbox mailbox;
2213 if (own_mailbox) { 2213 if (own_mailbox) {
2214 GLC(gl_, gl_->GenMailboxCHROMIUM(mailbox.name)); 2214 GLC(gl_, gl_->GenMailboxCHROMIUM(mailbox.name));
2215 if (mailbox.IsZero()) { 2215 if (mailbox.IsZero()) {
2216 gl_->DeleteTextures(1, &texture_id); 2216 gl_->DeleteTextures(1, &texture_id);
2217 request->SendEmptyResult(); 2217 request->SendEmptyResult();
2218 return; 2218 return;
2219 } 2219 }
2220 } else { 2220 } else {
2221 mailbox = request->texture_mailbox().name(); 2221 mailbox = request->texture_mailbox().mailbox();
2222 DCHECK_EQ(static_cast<unsigned>(GL_TEXTURE_2D), 2222 DCHECK_EQ(static_cast<unsigned>(GL_TEXTURE_2D),
2223 request->texture_mailbox().target()); 2223 request->texture_mailbox().target());
2224 DCHECK(!mailbox.IsZero()); 2224 DCHECK(!mailbox.IsZero());
2225 unsigned incoming_sync_point = request->texture_mailbox().sync_point(); 2225 unsigned incoming_sync_point = request->texture_mailbox().sync_point();
2226 if (incoming_sync_point) 2226 if (incoming_sync_point)
2227 GLC(gl_, gl_->WaitSyncPointCHROMIUM(incoming_sync_point)); 2227 GLC(gl_, gl_->WaitSyncPointCHROMIUM(incoming_sync_point));
2228 } 2228 }
2229 2229
2230 GLC(gl_, gl_->BindTexture(GL_TEXTURE_2D, texture_id)); 2230 GLC(gl_, gl_->BindTexture(GL_TEXTURE_2D, texture_id));
2231 if (own_mailbox) { 2231 if (own_mailbox) {
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
3008 is_scissor_enabled_ = false; 3008 is_scissor_enabled_ = false;
3009 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); 3009 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST));
3010 scissor_rect_needs_reset_ = true; 3010 scissor_rect_needs_reset_ = true;
3011 } 3011 }
3012 3012
3013 bool GLRenderer::IsContextLost() { 3013 bool GLRenderer::IsContextLost() {
3014 return output_surface_->context_provider()->IsContextLost(); 3014 return output_surface_->context_provider()->IsContextLost();
3015 } 3015 }
3016 3016
3017 } // namespace cc 3017 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698