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

Side by Side Diff: cc/surfaces/display.cc

Issue 533913003: Revert of Add LatencyInfo support for Surfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « cc/cc.gyp ('k') | cc/surfaces/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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/surfaces/display.h" 5 #include "cc/surfaces/display.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "cc/output/compositor_frame.h" 9 #include "cc/output/compositor_frame.h"
10 #include "cc/output/compositor_frame_ack.h" 10 #include "cc/output/compositor_frame_ack.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 gfx::Rect device_viewport_rect = gfx::Rect(current_surface_size_); 105 gfx::Rect device_viewport_rect = gfx::Rect(current_surface_size_);
106 gfx::Rect device_clip_rect = device_viewport_rect; 106 gfx::Rect device_clip_rect = device_viewport_rect;
107 bool disable_picture_quad_image_filtering = false; 107 bool disable_picture_quad_image_filtering = false;
108 108
109 renderer_->DecideRenderPassAllocationsForFrame(frame_data->render_pass_list); 109 renderer_->DecideRenderPassAllocationsForFrame(frame_data->render_pass_list);
110 renderer_->DrawFrame(&frame_data->render_pass_list, 110 renderer_->DrawFrame(&frame_data->render_pass_list,
111 device_scale_factor, 111 device_scale_factor,
112 device_viewport_rect, 112 device_viewport_rect,
113 device_clip_rect, 113 device_clip_rect,
114 disable_picture_quad_image_filtering); 114 disable_picture_quad_image_filtering);
115 renderer_->SwapBuffers(frame->metadata); 115 CompositorFrameMetadata metadata;
116 renderer_->SwapBuffers(metadata);
116 for (SurfaceAggregator::SurfaceIndexMap::iterator it = 117 for (SurfaceAggregator::SurfaceIndexMap::iterator it =
117 aggregator_->previous_contained_surfaces().begin(); 118 aggregator_->previous_contained_surfaces().begin();
118 it != aggregator_->previous_contained_surfaces().end(); 119 it != aggregator_->previous_contained_surfaces().end();
119 ++it) { 120 ++it) {
120 Surface* surface = manager_->GetSurfaceForId(it->first); 121 Surface* surface = manager_->GetSurfaceForId(it->first);
121 if (surface) 122 if (surface)
122 surface->RunDrawCallbacks(); 123 surface->RunDrawCallbacks();
123 } 124 }
124 return true; 125 return true;
125 } 126 }
126 127
127 void Display::OnSurfaceDamaged(SurfaceId surface) { 128 void Display::OnSurfaceDamaged(SurfaceId surface) {
128 if (aggregator_ && aggregator_->previous_contained_surfaces().count(surface)) 129 if (aggregator_ && aggregator_->previous_contained_surfaces().count(surface))
129 client_->DisplayDamaged(); 130 client_->DisplayDamaged();
130 } 131 }
131 132
132 SurfaceId Display::CurrentSurfaceId() { 133 SurfaceId Display::CurrentSurfaceId() {
133 return current_surface_id_; 134 return current_surface_id_;
134 } 135 }
135 136
136 } // namespace cc 137 } // namespace cc
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/surfaces/surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698