Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Side by Side Diff: cc/output/gl_renderer.cc

Issue 2250883004: mac: Fix IOSurface clearing for RPDQ CALayer promotion. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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(&params); 3984 UpdateRPDQTexturesForSampling(&params);
3981 UpdateRPDQBlendMode(&params); 3985 UpdateRPDQBlendMode(&params);
3982 ChooseRPDQProgram(&params); 3986 ChooseRPDQProgram(&params);
3983 UpdateRPDQUniforms(&params); 3987 UpdateRPDQUniforms(&params);
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698