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

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

Issue 2449853004: Getting rid of DelegatedFrameData (Closed)
Patch Set: 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 surface_manager->InvalidateFrameSinkId(frame_sink_id_); 47 surface_manager->InvalidateFrameSinkId(frame_sink_id_);
48 } 48 }
49 49
50 void ServerWindowCompositorFrameSink::SetNeedsBeginFrame( 50 void ServerWindowCompositorFrameSink::SetNeedsBeginFrame(
51 bool needs_begin_frame) { 51 bool needs_begin_frame) {
52 // TODO(fsamuel): Implement this. 52 // TODO(fsamuel): Implement this.
53 } 53 }
54 54
55 void ServerWindowCompositorFrameSink::SubmitCompositorFrame( 55 void ServerWindowCompositorFrameSink::SubmitCompositorFrame(
56 cc::CompositorFrame frame) { 56 cc::CompositorFrame frame) {
57 gfx::Size frame_size = 57 gfx::Size frame_size = frame.render_pass_list[0]->output_rect.size();
58 frame.delegated_frame_data->render_pass_list[0]->output_rect.size();
59 // If the size of the CompostiorFrame has changed then destroy the existing 58 // If the size of the CompostiorFrame has changed then destroy the existing
60 // Surface and create a new one of the appropriate size. 59 // Surface and create a new one of the appropriate size.
61 if (local_frame_id_.is_null() || frame_size != last_submitted_frame_size_) { 60 if (local_frame_id_.is_null() || frame_size != last_submitted_frame_size_) {
62 if (!local_frame_id_.is_null()) 61 if (!local_frame_id_.is_null())
63 surface_factory_.Destroy(local_frame_id_); 62 surface_factory_.Destroy(local_frame_id_);
64 local_frame_id_ = surface_id_allocator_.GenerateId(); 63 local_frame_id_ = surface_id_allocator_.GenerateId();
65 surface_factory_.Create(local_frame_id_); 64 surface_factory_.Create(local_frame_id_);
66 } 65 }
67 may_contain_video_ = frame.metadata.may_contain_video; 66 may_contain_video_ = frame.metadata.may_contain_video;
68 surface_factory_.SubmitCompositorFrame( 67 surface_factory_.SubmitCompositorFrame(
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 client_->ReclaimResources(resources); 99 client_->ReclaimResources(resources);
101 } 100 }
102 101
103 void ServerWindowCompositorFrameSink::SetBeginFrameSource( 102 void ServerWindowCompositorFrameSink::SetBeginFrameSource(
104 cc::BeginFrameSource* begin_frame_source) { 103 cc::BeginFrameSource* begin_frame_source) {
105 // TODO(tansell): Implement this. 104 // TODO(tansell): Implement this.
106 } 105 }
107 106
108 } // namespace ws 107 } // namespace ws
109 } // namespace ui 108 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698