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

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

Issue 1534623002: Mac CoreAnimation: Add more CALayer parameters (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix windows compile Created 5 years 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 | content/common/gpu/image_transport_surface_overlay_mac.h » ('j') | 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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 3524 matching lines...) Expand 10 before | Expand all | Expand 10 after
3535 pending_overlay_resources_.push_back( 3535 pending_overlay_resources_.push_back(
3536 make_scoped_ptr(new ResourceProvider::ScopedReadLockGL( 3536 make_scoped_ptr(new ResourceProvider::ScopedReadLockGL(
3537 resource_provider_, ca_layer_overlay.contents_resource_id))); 3537 resource_provider_, ca_layer_overlay.contents_resource_id)));
3538 texture_id = pending_overlay_resources_.back()->texture_id(); 3538 texture_id = pending_overlay_resources_.back()->texture_id();
3539 } 3539 }
3540 GLfloat contents_rect[4] = { 3540 GLfloat contents_rect[4] = {
3541 ca_layer_overlay.contents_rect.x(), ca_layer_overlay.contents_rect.y(), 3541 ca_layer_overlay.contents_rect.x(), ca_layer_overlay.contents_rect.y(),
3542 ca_layer_overlay.contents_rect.width(), 3542 ca_layer_overlay.contents_rect.width(),
3543 ca_layer_overlay.contents_rect.height(), 3543 ca_layer_overlay.contents_rect.height(),
3544 }; 3544 };
3545 GLfloat bounds_size[2] = { 3545 GLuint edge_aa_mask = 0;
3546 ca_layer_overlay.bounds_size.width(), 3546 GLfloat bounds_rect[4] = {
3547 0, 0, ca_layer_overlay.bounds_size.width(),
3547 ca_layer_overlay.bounds_size.height(), 3548 ca_layer_overlay.bounds_size.height(),
3548 }; 3549 };
3550 GLboolean is_clipped = GL_FALSE;
3551 GLfloat clip_rect[4] = {
3552 0, 0, 0, 0,
3553 };
3554 GLint sorting_context_id = 0;
3549 GLfloat transform[16]; 3555 GLfloat transform[16];
3550 ca_layer_overlay.transform.asColMajorf(transform); 3556 ca_layer_overlay.transform.asColMajorf(transform);
3551 gl_->ScheduleCALayerCHROMIUM( 3557 gl_->ScheduleCALayerCHROMIUM(
3552 texture_id, contents_rect, ca_layer_overlay.opacity, 3558 texture_id, contents_rect, ca_layer_overlay.opacity,
3553 ca_layer_overlay.background_color, bounds_size, transform); 3559 ca_layer_overlay.background_color, edge_aa_mask, bounds_rect,
3560 is_clipped, clip_rect, sorting_context_id, transform);
3554 } 3561 }
3555 } 3562 }
3556 3563
3557 void GLRenderer::ScheduleOverlays(DrawingFrame* frame) { 3564 void GLRenderer::ScheduleOverlays(DrawingFrame* frame) {
3558 if (!frame->overlay_list.size()) 3565 if (!frame->overlay_list.size())
3559 return; 3566 return;
3560 3567
3561 OverlayCandidateList& overlays = frame->overlay_list; 3568 OverlayCandidateList& overlays = frame->overlay_list;
3562 for (const OverlayCandidate& overlay : overlays) { 3569 for (const OverlayCandidate& overlay : overlays) {
3563 unsigned texture_id = 0; 3570 unsigned texture_id = 0;
3564 if (overlay.use_output_surface_for_resource) { 3571 if (overlay.use_output_surface_for_resource) {
3565 texture_id = output_surface_->GetOverlayTextureId(); 3572 texture_id = output_surface_->GetOverlayTextureId();
3566 DCHECK(texture_id || IsContextLost()); 3573 DCHECK(texture_id || IsContextLost());
3567 } else { 3574 } else {
3568 pending_overlay_resources_.push_back( 3575 pending_overlay_resources_.push_back(
3569 make_scoped_ptr(new ResourceProvider::ScopedReadLockGL( 3576 make_scoped_ptr(new ResourceProvider::ScopedReadLockGL(
3570 resource_provider_, overlay.resource_id))); 3577 resource_provider_, overlay.resource_id)));
3571 texture_id = pending_overlay_resources_.back()->texture_id(); 3578 texture_id = pending_overlay_resources_.back()->texture_id();
3572 } 3579 }
3573 3580
3574 context_support_->ScheduleOverlayPlane( 3581 context_support_->ScheduleOverlayPlane(
3575 overlay.plane_z_order, overlay.transform, texture_id, 3582 overlay.plane_z_order, overlay.transform, texture_id,
3576 ToNearestRect(overlay.display_rect), overlay.uv_rect); 3583 ToNearestRect(overlay.display_rect), overlay.uv_rect);
3577 } 3584 }
3578 } 3585 }
3579 3586
3580 } // namespace cc 3587 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | content/common/gpu/image_transport_surface_overlay_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698