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

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: add BeginFrameDidNotSwap to MojoCFS. 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 private: 125 private:
126 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrameTest); 126 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewChildFrameTest);
127 }; 127 };
128 128
129 cc::CompositorFrame CreateDelegatedFrame(float scale_factor, 129 cc::CompositorFrame CreateDelegatedFrame(float scale_factor,
130 gfx::Size size, 130 gfx::Size size,
131 const gfx::Rect& damage) { 131 const gfx::Rect& damage) {
132 cc::CompositorFrame frame; 132 cc::CompositorFrame frame;
133 frame.metadata.device_scale_factor = scale_factor; 133 frame.metadata.device_scale_factor = scale_factor;
134 frame.metadata.begin_frame_ack = cc::BeginFrameAck(0, 1, 1, 0, true);
134 135
135 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); 136 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create();
136 pass->SetNew(1, gfx::Rect(size), damage, gfx::Transform()); 137 pass->SetNew(1, gfx::Rect(size), damage, gfx::Transform());
137 frame.render_pass_list.push_back(std::move(pass)); 138 frame.render_pass_list.push_back(std::move(pass));
138 return frame; 139 return frame;
139 } 140 }
140 141
141 // http://crbug.com/696919 142 // http://crbug.com/696919
142 #if defined(OS_WIN) 143 #if defined(OS_WIN)
143 #define MAYBE_VisibilityTest DISABLED_VisibilityTest 144 #define MAYBE_VisibilityTest DISABLED_VisibilityTest
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 215
215 // Submit another frame. Since it has the same size and scale as the first 216 // Submit another frame. Since it has the same size and scale as the first
216 // one, the same surface id must be used. has_frame() must return true. 217 // one, the same surface id must be used. has_frame() must return true.
217 view_->OnSwapCompositorFrame( 218 view_->OnSwapCompositorFrame(
218 0, CreateDelegatedFrame(scale_factor, view_size, view_rect)); 219 0, CreateDelegatedFrame(scale_factor, view_size, view_rect));
219 EXPECT_EQ(surface_id, GetSurfaceId()); 220 EXPECT_EQ(surface_id, GetSurfaceId());
220 EXPECT_TRUE(view_->has_frame()); 221 EXPECT_TRUE(view_->has_frame());
221 } 222 }
222 223
223 } // namespace content 224 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698