| 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 3957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3968 | 3968 |
| 3969 gl_->GenFramebuffers(1, &temp_fbo); | 3969 gl_->GenFramebuffers(1, &temp_fbo); |
| 3970 gl_->BindFramebuffer(GL_FRAMEBUFFER, temp_fbo); | 3970 gl_->BindFramebuffer(GL_FRAMEBUFFER, temp_fbo); |
| 3971 gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, | 3971 gl_->FramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, |
| 3972 destination.target(), destination.texture_id(), 0); | 3972 destination.target(), destination.texture_id(), 0); |
| 3973 DCHECK(gl_->CheckFramebufferStatus(GL_FRAMEBUFFER) == | 3973 DCHECK(gl_->CheckFramebufferStatus(GL_FRAMEBUFFER) == |
| 3974 GL_FRAMEBUFFER_COMPLETE); | 3974 GL_FRAMEBUFFER_COMPLETE); |
| 3975 | 3975 |
| 3976 // Clear to 0 to ensure the background is transparent. | 3976 // Clear to 0 to ensure the background is transparent. |
| 3977 gl_->ClearColor(0, 0, 0, 0); | 3977 gl_->ClearColor(0, 0, 0, 0); |
| 3978 if (is_scissor_enabled_) |
| 3979 gl_->Disable(GL_SCISSOR_TEST); |
| 3978 gl_->Clear(GL_COLOR_BUFFER_BIT); | 3980 gl_->Clear(GL_COLOR_BUFFER_BIT); |
| 3981 if (is_scissor_enabled_) |
| 3982 gl_->Enable(GL_SCISSOR_TEST); |
| 3979 | 3983 |
| 3980 UpdateRPDQTexturesForSampling(¶ms); | 3984 UpdateRPDQTexturesForSampling(¶ms); |
| 3981 UpdateRPDQBlendMode(¶ms); | 3985 UpdateRPDQBlendMode(¶ms); |
| 3982 ChooseRPDQProgram(¶ms); | 3986 ChooseRPDQProgram(¶ms); |
| 3983 UpdateRPDQUniforms(¶ms); | 3987 UpdateRPDQUniforms(¶ms); |
| 3984 | 3988 |
| 3985 // Prior to drawing, set up the destination framebuffer and viewport. | 3989 // Prior to drawing, set up the destination framebuffer and viewport. |
| 3986 gl_->BindFramebuffer(GL_FRAMEBUFFER, temp_fbo); | 3990 gl_->BindFramebuffer(GL_FRAMEBUFFER, temp_fbo); |
| 3987 gl_->Viewport(0, 0, updated_dst_rect.width(), updated_dst_rect.height()); | 3991 gl_->Viewport(0, 0, updated_dst_rect.width(), updated_dst_rect.height()); |
| 3988 | 3992 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4038 | 4042 |
| 4039 gl_->ScheduleCALayerSharedStateCHROMIUM( | 4043 gl_->ScheduleCALayerSharedStateCHROMIUM( |
| 4040 ca_layer_overlay->shared_state->opacity, is_clipped, clip_rect, | 4044 ca_layer_overlay->shared_state->opacity, is_clipped, clip_rect, |
| 4041 sorting_context_id, gl_transform); | 4045 sorting_context_id, gl_transform); |
| 4042 gl_->ScheduleCALayerCHROMIUM( | 4046 gl_->ScheduleCALayerCHROMIUM( |
| 4043 texture_id, contents_rect, ca_layer_overlay->background_color, | 4047 texture_id, contents_rect, ca_layer_overlay->background_color, |
| 4044 ca_layer_overlay->edge_aa_mask, bounds_rect, filter); | 4048 ca_layer_overlay->edge_aa_mask, bounds_rect, filter); |
| 4045 } | 4049 } |
| 4046 | 4050 |
| 4047 } // namespace cc | 4051 } // namespace cc |
| OLD | NEW |