| 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 2333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2344 | 2344 |
| 2345 gpu::Mailbox mailbox; | 2345 gpu::Mailbox mailbox; |
| 2346 if (own_mailbox) { | 2346 if (own_mailbox) { |
| 2347 GLC(context_, context_->genMailboxCHROMIUM(mailbox.name)); | 2347 GLC(context_, context_->genMailboxCHROMIUM(mailbox.name)); |
| 2348 if (mailbox.IsZero()) { | 2348 if (mailbox.IsZero()) { |
| 2349 context_->deleteTexture(texture_id); | 2349 context_->deleteTexture(texture_id); |
| 2350 request->SendEmptyResult(); | 2350 request->SendEmptyResult(); |
| 2351 return; | 2351 return; |
| 2352 } | 2352 } |
| 2353 } else { | 2353 } else { |
| 2354 mailbox = request->texture_mailbox().name(); | 2354 mailbox = request->texture_mailbox().mailbox(); |
| 2355 DCHECK_EQ(static_cast<unsigned>(GL_TEXTURE_2D), | 2355 DCHECK_EQ(static_cast<unsigned>(GL_TEXTURE_2D), |
| 2356 request->texture_mailbox().target()); | 2356 request->texture_mailbox().target()); |
| 2357 DCHECK(!mailbox.IsZero()); | 2357 DCHECK(!mailbox.IsZero()); |
| 2358 unsigned incoming_sync_point = request->texture_mailbox().sync_point(); | 2358 unsigned incoming_sync_point = request->texture_mailbox().sync_point(); |
| 2359 if (incoming_sync_point) | 2359 if (incoming_sync_point) |
| 2360 GLC(context_, context_->waitSyncPoint(incoming_sync_point)); | 2360 GLC(context_, context_->waitSyncPoint(incoming_sync_point)); |
| 2361 } | 2361 } |
| 2362 | 2362 |
| 2363 GLC(context_, context_->bindTexture(GL_TEXTURE_2D, texture_id)); | 2363 GLC(context_, context_->bindTexture(GL_TEXTURE_2D, texture_id)); |
| 2364 if (own_mailbox) { | 2364 if (own_mailbox) { |
| (...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3185 // The Skia GPU backend requires a stencil buffer. See ReinitializeGrCanvas | 3185 // The Skia GPU backend requires a stencil buffer. See ReinitializeGrCanvas |
| 3186 // implementation. | 3186 // implementation. |
| 3187 return gr_context_ && context_->getContextAttributes().stencil; | 3187 return gr_context_ && context_->getContextAttributes().stencil; |
| 3188 } | 3188 } |
| 3189 | 3189 |
| 3190 bool GLRenderer::IsContextLost() { | 3190 bool GLRenderer::IsContextLost() { |
| 3191 return output_surface_->context_provider()->IsContextLost(); | 3191 return output_surface_->context_provider()->IsContextLost(); |
| 3192 } | 3192 } |
| 3193 | 3193 |
| 3194 } // namespace cc | 3194 } // namespace cc |
| OLD | NEW |