| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 3787 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3798 } else { | 3798 } else { |
| 3799 gl_->Disable(GL_SCISSOR_TEST); | 3799 gl_->Disable(GL_SCISSOR_TEST); |
| 3800 } | 3800 } |
| 3801 } | 3801 } |
| 3802 | 3802 |
| 3803 bool GLRenderer::IsContextLost() { | 3803 bool GLRenderer::IsContextLost() { |
| 3804 return gl_->GetGraphicsResetStatusKHR() != GL_NO_ERROR; | 3804 return gl_->GetGraphicsResetStatusKHR() != GL_NO_ERROR; |
| 3805 } | 3805 } |
| 3806 | 3806 |
| 3807 void GLRenderer::ScheduleCALayers(DrawingFrame* frame) { | 3807 void GLRenderer::ScheduleCALayers(DrawingFrame* frame) { |
| 3808 if (overlay_resource_pool_) { |
| 3809 overlay_resource_pool_->CheckBusyResources(); |
| 3810 } |
| 3811 |
| 3808 scoped_refptr<CALayerOverlaySharedState> shared_state; | 3812 scoped_refptr<CALayerOverlaySharedState> shared_state; |
| 3809 size_t copied_render_pass_count = 0; | 3813 size_t copied_render_pass_count = 0; |
| 3810 for (const CALayerOverlay& ca_layer_overlay : frame->ca_layer_overlay_list) { | 3814 for (const CALayerOverlay& ca_layer_overlay : frame->ca_layer_overlay_list) { |
| 3811 if (ca_layer_overlay.rpdq) { | 3815 if (ca_layer_overlay.rpdq) { |
| 3812 ScheduleRenderPassDrawQuad(&ca_layer_overlay, frame); | 3816 ScheduleRenderPassDrawQuad(&ca_layer_overlay, frame); |
| 3813 shared_state = nullptr; | 3817 shared_state = nullptr; |
| 3814 ++copied_render_pass_count; | 3818 ++copied_render_pass_count; |
| 3815 continue; | 3819 continue; |
| 3816 } | 3820 } |
| 3817 | 3821 |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4060 | 4064 |
| 4061 gl_->ScheduleCALayerSharedStateCHROMIUM( | 4065 gl_->ScheduleCALayerSharedStateCHROMIUM( |
| 4062 ca_layer_overlay->shared_state->opacity, is_clipped, clip_rect, | 4066 ca_layer_overlay->shared_state->opacity, is_clipped, clip_rect, |
| 4063 sorting_context_id, gl_transform); | 4067 sorting_context_id, gl_transform); |
| 4064 gl_->ScheduleCALayerCHROMIUM( | 4068 gl_->ScheduleCALayerCHROMIUM( |
| 4065 texture_id, contents_rect, ca_layer_overlay->background_color, | 4069 texture_id, contents_rect, ca_layer_overlay->background_color, |
| 4066 ca_layer_overlay->edge_aa_mask, bounds_rect, filter); | 4070 ca_layer_overlay->edge_aa_mask, bounds_rect, filter); |
| 4067 } | 4071 } |
| 4068 | 4072 |
| 4069 } // namespace cc | 4073 } // namespace cc |
| OLD | NEW |