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 2903 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2914 frame->current_texture = texture; | 2914 frame->current_texture = texture; |
2915 | 2915 |
2916 return BindFramebufferToTexture(frame, texture, viewport_rect); | 2916 return BindFramebufferToTexture(frame, texture, viewport_rect); |
2917 } | 2917 } |
2918 | 2918 |
2919 void GLRenderer::BindFramebufferToOutputSurface(DrawingFrame* frame) { | 2919 void GLRenderer::BindFramebufferToOutputSurface(DrawingFrame* frame) { |
2920 current_framebuffer_lock_ = nullptr; | 2920 current_framebuffer_lock_ = nullptr; |
2921 output_surface_->BindFramebuffer(); | 2921 output_surface_->BindFramebuffer(); |
2922 | 2922 |
2923 if (output_surface_->HasExternalStencilTest()) { | 2923 if (output_surface_->HasExternalStencilTest()) { |
| 2924 output_surface_->ApplyExternalStencil(); |
2924 SetStencilEnabled(true); | 2925 SetStencilEnabled(true); |
2925 gl_->StencilFunc(GL_EQUAL, 1, 1); | |
2926 } else { | 2926 } else { |
2927 SetStencilEnabled(false); | 2927 SetStencilEnabled(false); |
2928 } | 2928 } |
2929 } | 2929 } |
2930 | 2930 |
2931 bool GLRenderer::BindFramebufferToTexture(DrawingFrame* frame, | 2931 bool GLRenderer::BindFramebufferToTexture(DrawingFrame* frame, |
2932 const ScopedResource* texture, | 2932 const ScopedResource* texture, |
2933 const gfx::Rect& target_rect) { | 2933 const gfx::Rect& target_rect) { |
2934 DCHECK(texture->id()); | 2934 DCHECK(texture->id()); |
2935 | 2935 |
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3581 texture_id = pending_overlay_resources_.back()->texture_id(); | 3581 texture_id = pending_overlay_resources_.back()->texture_id(); |
3582 } | 3582 } |
3583 | 3583 |
3584 context_support_->ScheduleOverlayPlane( | 3584 context_support_->ScheduleOverlayPlane( |
3585 overlay.plane_z_order, overlay.transform, texture_id, | 3585 overlay.plane_z_order, overlay.transform, texture_id, |
3586 ToNearestRect(overlay.display_rect), overlay.uv_rect); | 3586 ToNearestRect(overlay.display_rect), overlay.uv_rect); |
3587 } | 3587 } |
3588 } | 3588 } |
3589 | 3589 |
3590 } // namespace cc | 3590 } // namespace cc |
OLD | NEW |