| 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 2694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2705 } else { | 2705 } else { |
| 2706 SetStencilEnabled(false); | 2706 SetStencilEnabled(false); |
| 2707 } | 2707 } |
| 2708 } | 2708 } |
| 2709 | 2709 |
| 2710 bool GLRenderer::BindFramebufferToTexture(DrawingFrame* frame, | 2710 bool GLRenderer::BindFramebufferToTexture(DrawingFrame* frame, |
| 2711 const ScopedResource* texture, | 2711 const ScopedResource* texture, |
| 2712 const gfx::Rect& target_rect) { | 2712 const gfx::Rect& target_rect) { |
| 2713 DCHECK(texture->id()); | 2713 DCHECK(texture->id()); |
| 2714 | 2714 |
| 2715 // Explicitly release lock, otherwise we can crash when try to lock |
| 2716 // same texture again. |
| 2715 current_framebuffer_lock_ = nullptr; | 2717 current_framebuffer_lock_ = nullptr; |
| 2716 | 2718 |
| 2717 SetStencilEnabled(false); | 2719 SetStencilEnabled(false); |
| 2718 GLC(gl_, gl_->BindFramebuffer(GL_FRAMEBUFFER, offscreen_framebuffer_id_)); | 2720 GLC(gl_, gl_->BindFramebuffer(GL_FRAMEBUFFER, offscreen_framebuffer_id_)); |
| 2719 current_framebuffer_lock_ = | 2721 current_framebuffer_lock_ = |
| 2720 make_scoped_ptr(new ResourceProvider::ScopedWriteLockGL( | 2722 make_scoped_ptr(new ResourceProvider::ScopedWriteLockGL( |
| 2721 resource_provider_, texture->id())); | 2723 resource_provider_, texture->id())); |
| 2722 unsigned texture_id = current_framebuffer_lock_->texture_id(); | 2724 unsigned texture_id = current_framebuffer_lock_->texture_id(); |
| 2723 GLC(gl_, | 2725 GLC(gl_, |
| 2724 gl_->FramebufferTexture2D( | 2726 gl_->FramebufferTexture2D( |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3306 context_support_->ScheduleOverlayPlane( | 3308 context_support_->ScheduleOverlayPlane( |
| 3307 overlay.plane_z_order, | 3309 overlay.plane_z_order, |
| 3308 overlay.transform, | 3310 overlay.transform, |
| 3309 pending_overlay_resources_.back()->texture_id(), | 3311 pending_overlay_resources_.back()->texture_id(), |
| 3310 overlay.display_rect, | 3312 overlay.display_rect, |
| 3311 overlay.uv_rect); | 3313 overlay.uv_rect); |
| 3312 } | 3314 } |
| 3313 } | 3315 } |
| 3314 | 3316 |
| 3315 } // namespace cc | 3317 } // namespace cc |
| OLD | NEW |