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

Side by Side Diff: android_webview/browser/test/rendering_test.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
« no previous file with comments | « android_webview/browser/surfaces_instance.cc ('k') | ash/laser/laser_pointer_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "android_webview/browser/test/rendering_test.h" 5 #include "android_webview/browser/test/rendering_test.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "android_webview/browser/browser_view_renderer.h" 9 #include "android_webview/browser/browser_view_renderer.h"
10 #include "android_webview/browser/child_frame.h" 10 #include "android_webview/browser/child_frame.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 ui_task_runner_->PostTask(FROM_HERE, run_loop_.QuitWhenIdleClosure()); 111 ui_task_runner_->PostTask(FROM_HERE, run_loop_.QuitWhenIdleClosure());
112 } 112 }
113 113
114 content::SynchronousCompositor* RenderingTest::ActiveCompositor() const { 114 content::SynchronousCompositor* RenderingTest::ActiveCompositor() const {
115 return browser_view_renderer_->GetActiveCompositorForTesting(); 115 return browser_view_renderer_->GetActiveCompositorForTesting();
116 } 116 }
117 117
118 std::unique_ptr<cc::CompositorFrame> RenderingTest::ConstructEmptyFrame() { 118 std::unique_ptr<cc::CompositorFrame> RenderingTest::ConstructEmptyFrame() {
119 std::unique_ptr<cc::CompositorFrame> compositor_frame( 119 std::unique_ptr<cc::CompositorFrame> compositor_frame(
120 new cc::CompositorFrame); 120 new cc::CompositorFrame);
121 compositor_frame->metadata.begin_frame_ack =
122 cc::BeginFrameAck(0, 1, 1, 0, true);
121 std::unique_ptr<cc::RenderPass> root_pass(cc::RenderPass::Create()); 123 std::unique_ptr<cc::RenderPass> root_pass(cc::RenderPass::Create());
122 gfx::Rect viewport(browser_view_renderer_->size()); 124 gfx::Rect viewport(browser_view_renderer_->size());
123 root_pass->SetNew(1, viewport, viewport, gfx::Transform()); 125 root_pass->SetNew(1, viewport, viewport, gfx::Transform());
124 compositor_frame->render_pass_list.push_back(std::move(root_pass)); 126 compositor_frame->render_pass_list.push_back(std::move(root_pass));
125 return compositor_frame; 127 return compositor_frame;
126 } 128 }
127 129
128 std::unique_ptr<cc::CompositorFrame> RenderingTest::ConstructFrame( 130 std::unique_ptr<cc::CompositorFrame> RenderingTest::ConstructFrame(
129 cc::ResourceId resource_id) { 131 cc::ResourceId resource_id) {
130 std::unique_ptr<cc::CompositorFrame> compositor_frame(ConstructEmptyFrame()); 132 std::unique_ptr<cc::CompositorFrame> compositor_frame(ConstructEmptyFrame());
(...skipping 26 matching lines...) Expand all
157 void RenderingTest::PostInvalidate() { 159 void RenderingTest::PostInvalidate() {
158 if (window_) 160 if (window_)
159 window_->PostInvalidate(); 161 window_->PostInvalidate();
160 } 162 }
161 163
162 gfx::Point RenderingTest::GetLocationOnScreen() { 164 gfx::Point RenderingTest::GetLocationOnScreen() {
163 return gfx::Point(); 165 return gfx::Point();
164 } 166 }
165 167
166 } // namespace android_webview 168 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/surfaces_instance.cc ('k') | ash/laser/laser_pointer_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698