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

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

Issue 2162713002: Finish plumbing for CALayerOverlay filter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 3642 matching lines...) Expand 10 before | Expand all | Expand 10 after
3653 ca_layer_overlay.bounds_rect.height(), 3653 ca_layer_overlay.bounds_rect.height(),
3654 }; 3654 };
3655 GLboolean is_clipped = ca_layer_overlay.is_clipped; 3655 GLboolean is_clipped = ca_layer_overlay.is_clipped;
3656 GLfloat clip_rect[4] = {ca_layer_overlay.clip_rect.x(), 3656 GLfloat clip_rect[4] = {ca_layer_overlay.clip_rect.x(),
3657 ca_layer_overlay.clip_rect.y(), 3657 ca_layer_overlay.clip_rect.y(),
3658 ca_layer_overlay.clip_rect.width(), 3658 ca_layer_overlay.clip_rect.width(),
3659 ca_layer_overlay.clip_rect.height()}; 3659 ca_layer_overlay.clip_rect.height()};
3660 GLint sorting_context_id = ca_layer_overlay.sorting_context_id; 3660 GLint sorting_context_id = ca_layer_overlay.sorting_context_id;
3661 GLfloat transform[16]; 3661 GLfloat transform[16];
3662 ca_layer_overlay.transform.asColMajorf(transform); 3662 ca_layer_overlay.transform.asColMajorf(transform);
3663 unsigned filter = GL_LINEAR; 3663 unsigned filter = ca_layer_overlay.filter;
3664 gl_->ScheduleCALayerCHROMIUM( 3664 gl_->ScheduleCALayerCHROMIUM(
3665 texture_id, contents_rect, ca_layer_overlay.opacity, 3665 texture_id, contents_rect, ca_layer_overlay.opacity,
3666 ca_layer_overlay.background_color, ca_layer_overlay.edge_aa_mask, 3666 ca_layer_overlay.background_color, ca_layer_overlay.edge_aa_mask,
3667 bounds_rect, is_clipped, clip_rect, sorting_context_id, transform, 3667 bounds_rect, is_clipped, clip_rect, sorting_context_id, transform,
3668 filter); 3668 filter);
3669 } 3669 }
3670 } 3670 }
3671 3671
3672 void GLRenderer::ScheduleOverlays(DrawingFrame* frame) { 3672 void GLRenderer::ScheduleOverlays(DrawingFrame* frame) {
3673 if (frame->overlay_list.empty()) 3673 if (frame->overlay_list.empty())
(...skipping 12 matching lines...) Expand all
3686 texture_id = pending_overlay_resources_.back()->texture_id(); 3686 texture_id = pending_overlay_resources_.back()->texture_id();
3687 } 3687 }
3688 3688
3689 context_support_->ScheduleOverlayPlane( 3689 context_support_->ScheduleOverlayPlane(
3690 overlay.plane_z_order, overlay.transform, texture_id, 3690 overlay.plane_z_order, overlay.transform, texture_id,
3691 ToNearestRect(overlay.display_rect), overlay.uv_rect); 3691 ToNearestRect(overlay.display_rect), overlay.uv_rect);
3692 } 3692 }
3693 } 3693 }
3694 3694
3695 } // namespace cc 3695 } // 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