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

Side by Side Diff: services/ui/ws/server_window_compositor_frame_sink.cc

Issue 2449853004: Getting rid of DelegatedFrameData (Closed)
Patch Set: Compile error + auro widget Created 4 years, 1 month 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/ws/server_window_compositor_frame_sink.h" 5 #include "services/ui/ws/server_window_compositor_frame_sink.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.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/quads/shared_quad_state.h" 10 #include "cc/quads/shared_quad_state.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 surface_manager->InvalidateFrameSinkId(frame_sink_id_); 46 surface_manager->InvalidateFrameSinkId(frame_sink_id_);
47 } 47 }
48 48
49 void ServerWindowCompositorFrameSink::SetNeedsBeginFrame( 49 void ServerWindowCompositorFrameSink::SetNeedsBeginFrame(
50 bool needs_begin_frame) { 50 bool needs_begin_frame) {
51 // TODO(fsamuel): Implement this. 51 // TODO(fsamuel): Implement this.
52 } 52 }
53 53
54 void ServerWindowCompositorFrameSink::SubmitCompositorFrame( 54 void ServerWindowCompositorFrameSink::SubmitCompositorFrame(
55 cc::CompositorFrame frame) { 55 cc::CompositorFrame frame) {
56 gfx::Size frame_size = 56 gfx::Size frame_size = frame.render_pass_list[0]->output_rect.size();
57 frame.delegated_frame_data->render_pass_list[0]->output_rect.size();
58 // If the size of the CompostiorFrame has changed then destroy the existing 57 // If the size of the CompostiorFrame has changed then destroy the existing
59 // Surface and create a new one of the appropriate size. 58 // Surface and create a new one of the appropriate size.
60 if (local_frame_id_.is_null() || frame_size != last_submitted_frame_size_) { 59 if (local_frame_id_.is_null() || frame_size != last_submitted_frame_size_) {
61 if (!local_frame_id_.is_null()) 60 if (!local_frame_id_.is_null())
62 surface_factory_.Destroy(local_frame_id_); 61 surface_factory_.Destroy(local_frame_id_);
63 local_frame_id_ = surface_id_allocator_.GenerateId(); 62 local_frame_id_ = surface_id_allocator_.GenerateId();
64 surface_factory_.Create(local_frame_id_); 63 surface_factory_.Create(local_frame_id_);
65 } 64 }
66 surface_factory_.SubmitCompositorFrame( 65 surface_factory_.SubmitCompositorFrame(
67 local_frame_id_, std::move(frame), 66 local_frame_id_, std::move(frame),
(...skipping 17 matching lines...) Expand all
85 client_->ReclaimResources(resources); 84 client_->ReclaimResources(resources);
86 } 85 }
87 86
88 void ServerWindowCompositorFrameSink::SetBeginFrameSource( 87 void ServerWindowCompositorFrameSink::SetBeginFrameSource(
89 cc::BeginFrameSource* begin_frame_source) { 88 cc::BeginFrameSource* begin_frame_source) {
90 // TODO(tansell): Implement this. 89 // TODO(tansell): Implement this.
91 } 90 }
92 91
93 } // namespace ws 92 } // namespace ws
94 } // namespace ui 93 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698