OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |