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

Side by Side Diff: services/ui/surfaces/display_compositor.cc

Issue 2167713002: cc: Delete SurfaceDrawStatus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Scott's comments 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 | « services/ui/surfaces/display_compositor.h ('k') | services/ui/ws/frame_generator.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/ui/surfaces/display_compositor.h" 5 #include "services/ui/surfaces/display_compositor.h"
6 6
7 #include "cc/output/copy_output_request.h" 7 #include "cc/output/copy_output_request.h"
8 #include "cc/output/output_surface.h" 8 #include "cc/output/output_surface.h"
9 #include "cc/output/renderer_settings.h" 9 #include "cc/output/renderer_settings.h"
10 #include "cc/output/texture_mailbox_deleter.h" 10 #include "cc/output/texture_mailbox_deleter.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 allocator_.client_id()); 75 allocator_.client_id());
76 } 76 }
77 77
78 DisplayCompositor::~DisplayCompositor() { 78 DisplayCompositor::~DisplayCompositor() {
79 surfaces_state_->manager()->UnregisterSurfaceFactoryClient( 79 surfaces_state_->manager()->UnregisterSurfaceFactoryClient(
80 allocator_.client_id()); 80 allocator_.client_id());
81 } 81 }
82 82
83 void DisplayCompositor::SubmitCompositorFrame( 83 void DisplayCompositor::SubmitCompositorFrame(
84 cc::CompositorFrame frame, 84 cc::CompositorFrame frame,
85 const base::Callback<void(cc::SurfaceDrawStatus)>& callback) { 85 const base::Callback<void()>& callback) {
86 gfx::Size frame_size = 86 gfx::Size frame_size =
87 frame.delegated_frame_data->render_pass_list.back()->output_rect.size(); 87 frame.delegated_frame_data->render_pass_list.back()->output_rect.size();
88 if (frame_size.IsEmpty() || frame_size != display_size_) { 88 if (frame_size.IsEmpty() || frame_size != display_size_) {
89 if (!surface_id_.is_null()) 89 if (!surface_id_.is_null())
90 factory_.Destroy(surface_id_); 90 factory_.Destroy(surface_id_);
91 surface_id_ = allocator_.GenerateId(); 91 surface_id_ = allocator_.GenerateId();
92 factory_.Create(surface_id_); 92 factory_.Create(surface_id_);
93 display_size_ = frame_size; 93 display_size_ = frame_size;
94 display_->Resize(display_size_); 94 display_->Resize(display_size_);
95 } 95 }
(...skipping 19 matching lines...) Expand all
115 void DisplayCompositor::DisplayOutputSurfaceLost() { 115 void DisplayCompositor::DisplayOutputSurfaceLost() {
116 // TODO(fsamuel): This looks like it would crash if a frame was in flight and 116 // TODO(fsamuel): This looks like it would crash if a frame was in flight and
117 // will be submitted. 117 // will be submitted.
118 display_.reset(); 118 display_.reset();
119 } 119 }
120 120
121 void DisplayCompositor::DisplaySetMemoryPolicy( 121 void DisplayCompositor::DisplaySetMemoryPolicy(
122 const cc::ManagedMemoryPolicy& policy) {} 122 const cc::ManagedMemoryPolicy& policy) {}
123 123
124 } // namespace ui 124 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/surfaces/display_compositor.h ('k') | services/ui/ws/frame_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698