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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc

Issue 2755463002: [cc] Fix CompositorFrameSinkSupport BeginFrameAck interface. (Closed)
Patch Set: sync Created 3 years, 9 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 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 "content/browser/frame_host/render_widget_host_view_child_frame.h" 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 private: 134 private:
135 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrameTest); 135 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrameTest);
136 }; 136 };
137 137
138 cc::CompositorFrame CreateDelegatedFrame(float scale_factor, 138 cc::CompositorFrame CreateDelegatedFrame(float scale_factor,
139 gfx::Size size, 139 gfx::Size size,
140 const gfx::Rect& damage) { 140 const gfx::Rect& damage) {
141 cc::CompositorFrame frame; 141 cc::CompositorFrame frame;
142 frame.metadata.device_scale_factor = scale_factor; 142 frame.metadata.device_scale_factor = scale_factor;
143 frame.metadata.begin_frame_ack = cc::BeginFrameAck(0, 1, 1, 0, true);
143 144
144 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); 145 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
145 pass->SetNew(1, gfx::Rect(size), damage, gfx::Transform()); 146 pass->SetNew(1, gfx::Rect(size), damage, gfx::Transform());
146 frame.render_pass_list.push_back(std::move(pass)); 147 frame.render_pass_list.push_back(std::move(pass));
147 return frame; 148 return frame;
148 } 149 }
149 150
150 // http://crbug.com/696919 151 // http://crbug.com/696919
151 #if defined(OS_WIN) 152 #if defined(OS_WIN)
152 #define MAYBE_VisibilityTest DISABLED_VisibilityTest 153 #define MAYBE_VisibilityTest DISABLED_VisibilityTest
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 // Submit another frame with the same local surface id. The same id should be 227 // Submit another frame with the same local surface id. The same id should be
227 // usable. 228 // usable.
228 view_->OnSwapCompositorFrame( 229 view_->OnSwapCompositorFrame(
229 0, kArbitraryLocalSurfaceId, 230 0, kArbitraryLocalSurfaceId,
230 CreateDelegatedFrame(scale_factor, view_size, view_rect)); 231 CreateDelegatedFrame(scale_factor, view_size, view_rect));
231 EXPECT_EQ(kArbitraryLocalSurfaceId, GetLocalSurfaceId()); 232 EXPECT_EQ(kArbitraryLocalSurfaceId, GetLocalSurfaceId());
232 EXPECT_TRUE(view_->has_frame()); 233 EXPECT_TRUE(view_->has_frame());
233 } 234 }
234 235
235 } // namespace content 236 } // namespace content
OLDNEW
« no previous file with comments | « components/exo/surface.cc ('k') | content/browser/frame_host/render_widget_host_view_guest_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698