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

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

Issue 132233041: Add gpu::MailboxHolder to hold state for a gpu::Mailbox (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ff7262fa Rebase. Created 6 years, 10 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 | « cc/layers/texture_layer_unittest.cc ('k') | cc/resources/release_callback.h » ('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 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 2195 matching lines...) Expand 10 before | Expand all | Expand 10 after
2206 2206
2207 gpu::Mailbox mailbox; 2207 gpu::Mailbox mailbox;
2208 if (own_mailbox) { 2208 if (own_mailbox) {
2209 GLC(gl_, gl_->GenMailboxCHROMIUM(mailbox.name)); 2209 GLC(gl_, gl_->GenMailboxCHROMIUM(mailbox.name));
2210 if (mailbox.IsZero()) { 2210 if (mailbox.IsZero()) {
2211 gl_->DeleteTextures(1, &texture_id); 2211 gl_->DeleteTextures(1, &texture_id);
2212 request->SendEmptyResult(); 2212 request->SendEmptyResult();
2213 return; 2213 return;
2214 } 2214 }
2215 } else { 2215 } else {
2216 mailbox = request->texture_mailbox().name(); 2216 mailbox = request->texture_mailbox().mailbox();
2217 DCHECK_EQ(static_cast<unsigned>(GL_TEXTURE_2D), 2217 DCHECK_EQ(static_cast<unsigned>(GL_TEXTURE_2D),
2218 request->texture_mailbox().target()); 2218 request->texture_mailbox().target());
2219 DCHECK(!mailbox.IsZero()); 2219 DCHECK(!mailbox.IsZero());
2220 unsigned incoming_sync_point = request->texture_mailbox().sync_point(); 2220 unsigned incoming_sync_point = request->texture_mailbox().sync_point();
2221 if (incoming_sync_point) 2221 if (incoming_sync_point)
2222 GLC(gl_, gl_->WaitSyncPointCHROMIUM(incoming_sync_point)); 2222 GLC(gl_, gl_->WaitSyncPointCHROMIUM(incoming_sync_point));
2223 } 2223 }
2224 2224
2225 GLC(gl_, gl_->BindTexture(GL_TEXTURE_2D, texture_id)); 2225 GLC(gl_, gl_->BindTexture(GL_TEXTURE_2D, texture_id));
2226 if (own_mailbox) { 2226 if (own_mailbox) {
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
3003 is_scissor_enabled_ = false; 3003 is_scissor_enabled_ = false;
3004 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST)); 3004 GLC(gl_, gl_->Disable(GL_SCISSOR_TEST));
3005 scissor_rect_needs_reset_ = true; 3005 scissor_rect_needs_reset_ = true;
3006 } 3006 }
3007 3007
3008 bool GLRenderer::IsContextLost() { 3008 bool GLRenderer::IsContextLost() {
3009 return output_surface_->context_provider()->IsContextLost(); 3009 return output_surface_->context_provider()->IsContextLost();
3010 } 3010 }
3011 3011
3012 } // namespace cc 3012 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/texture_layer_unittest.cc ('k') | cc/resources/release_callback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698