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

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

Issue 2042553002: Mac CoreAnimation compositor in the browser process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lock_directly
Patch Set: Created 4 years, 6 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 | cc/output/output_surface.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 <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 3574 matching lines...) Expand 10 before | Expand all | Expand 10 after
3585 // PrepareSurfaceForPass also clears the surface, which is not desired when 3585 // PrepareSurfaceForPass also clears the surface, which is not desired when
3586 // restoring. 3586 // restoring.
3587 SetViewport(); 3587 SetViewport();
3588 } 3588 }
3589 3589
3590 bool GLRenderer::IsContextLost() { 3590 bool GLRenderer::IsContextLost() {
3591 return gl_->GetGraphicsResetStatusKHR() != GL_NO_ERROR; 3591 return gl_->GetGraphicsResetStatusKHR() != GL_NO_ERROR;
3592 } 3592 }
3593 3593
3594 void GLRenderer::ScheduleCALayers(DrawingFrame* frame) { 3594 void GLRenderer::ScheduleCALayers(DrawingFrame* frame) {
3595 output_surface_->ProcessCALayers(frame->ca_layer_overlay_list);
3596 for (CALayerOverlay& ca_layer_overlay : frame->ca_layer_overlay_list) {
3597 if (ca_layer_overlay.resource_lock) {
3598 pending_overlay_resources_.push_back(
3599 std::move(ca_layer_overlay.resource_lock));
3600 }
3601 }
3602 frame->ca_layer_overlay_list.clear();
3603 return;
3604
3595 for (CALayerOverlay& ca_layer_overlay : frame->ca_layer_overlay_list) { 3605 for (CALayerOverlay& ca_layer_overlay : frame->ca_layer_overlay_list) {
3596 unsigned texture_id = 0; 3606 unsigned texture_id = 0;
3597 if (ca_layer_overlay.resource_lock) { 3607 if (ca_layer_overlay.resource_lock) {
3598 texture_id = ca_layer_overlay.resource_lock->GetTextureId(); 3608 texture_id = ca_layer_overlay.resource_lock->GetTextureId();
3599 pending_overlay_resources_.push_back( 3609 pending_overlay_resources_.push_back(
3600 std::move(ca_layer_overlay.resource_lock)); 3610 std::move(ca_layer_overlay.resource_lock));
3601 } 3611 }
3602 GLfloat contents_rect[4] = { 3612 GLfloat contents_rect[4] = {
3603 ca_layer_overlay.contents_rect.x(), ca_layer_overlay.contents_rect.y(), 3613 ca_layer_overlay.contents_rect.x(), ca_layer_overlay.contents_rect.y(),
3604 ca_layer_overlay.contents_rect.width(), 3614 ca_layer_overlay.contents_rect.width(),
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
3644 texture_id = pending_overlay_resources_.back()->GetTextureId(); 3654 texture_id = pending_overlay_resources_.back()->GetTextureId();
3645 } 3655 }
3646 3656
3647 context_support_->ScheduleOverlayPlane( 3657 context_support_->ScheduleOverlayPlane(
3648 overlay.plane_z_order, overlay.transform, texture_id, 3658 overlay.plane_z_order, overlay.transform, texture_id,
3649 ToNearestRect(overlay.display_rect), overlay.uv_rect); 3659 ToNearestRect(overlay.display_rect), overlay.uv_rect);
3650 } 3660 }
3651 } 3661 }
3652 3662
3653 } // namespace cc 3663 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698