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

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

Issue 2701663003: CompositorFrameSinkSupportClient::WillDraw needs to take in arguments (Closed)
Patch Set: c Created 3 years, 10 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
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/ws/frame_generator.h" 5 #include "services/ui/ws/frame_generator.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/adapters.h" 10 #include "base/containers/adapters.h"
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 } 102 }
103 103
104 void FrameGenerator::ReclaimResources( 104 void FrameGenerator::ReclaimResources(
105 const cc::ReturnedResourceArray& resources) { 105 const cc::ReturnedResourceArray& resources) {
106 // Nothing to do here because FrameGenerator CompositorFrames don't reference 106 // Nothing to do here because FrameGenerator CompositorFrames don't reference
107 // any resources. 107 // any resources.
108 DCHECK(resources.empty()); 108 DCHECK(resources.empty());
109 } 109 }
110 110
111 void FrameGenerator::WillDrawSurface() { 111 void FrameGenerator::WillDrawSurface(const cc::LocalSurfaceId& local_surface_id,
112 const gfx::Rect& damage_rect) {
112 // TODO(fsamuel, staraz): Implement this. 113 // TODO(fsamuel, staraz): Implement this.
113 } 114 }
114 115
115 cc::CompositorFrame FrameGenerator::GenerateCompositorFrame( 116 cc::CompositorFrame FrameGenerator::GenerateCompositorFrame(
116 const gfx::Rect& output_rect) { 117 const gfx::Rect& output_rect) {
117 const int render_pass_id = 1; 118 const int render_pass_id = 1;
118 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create(); 119 std::unique_ptr<cc::RenderPass> render_pass = cc::RenderPass::Create();
119 render_pass->SetNew(render_pass_id, output_rect, output_rect, 120 render_pass->SetNew(render_pass_id, output_rect, output_rect,
120 gfx::Transform()); 121 gfx::Transform());
121 122
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 0 /* sorting-context_id */); 179 0 /* sorting-context_id */);
179 auto* quad = pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>(); 180 auto* quad = pass->CreateAndAppendDrawQuad<cc::SurfaceDrawQuad>();
180 quad->SetAll(sqs, bounds_at_origin /* rect */, gfx::Rect() /* opaque_rect */, 181 quad->SetAll(sqs, bounds_at_origin /* rect */, gfx::Rect() /* opaque_rect */,
181 bounds_at_origin /* visible_rect */, true /* needs_blending*/, 182 bounds_at_origin /* visible_rect */, true /* needs_blending*/,
182 window_manager_surface_info_.id()); 183 window_manager_surface_info_.id());
183 } 184 }
184 185
185 } // namespace ws 186 } // namespace ws
186 187
187 } // namespace ui 188 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/ws/frame_generator.h ('k') | third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698