| OLD | NEW |
| 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 "android_webview/browser/browser_view_renderer.h" | 7 #include "android_webview/browser/browser_view_renderer.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "content/public/test/test_synchronous_compositor_android.h" | 9 #include "content/public/test/test_synchronous_compositor_android.h" |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void RenderingTest::QuitMessageLoop() { | 59 void RenderingTest::QuitMessageLoop() { |
| 60 DCHECK_EQ(base::MessageLoop::current(), message_loop_.get()); | 60 DCHECK_EQ(base::MessageLoop::current(), message_loop_.get()); |
| 61 message_loop_->QuitWhenIdle(); | 61 message_loop_->QuitWhenIdle(); |
| 62 } | 62 } |
| 63 | 63 |
| 64 bool RenderingTest::RequestDrawGL(bool wait_for_completion) { | 64 bool RenderingTest::RequestDrawGL(bool wait_for_completion) { |
| 65 window_->RequestDrawGL(wait_for_completion); | 65 window_->RequestDrawGL(wait_for_completion); |
| 66 return true; | 66 return true; |
| 67 } | 67 } |
| 68 | 68 |
| 69 bool RenderingTest::WillDrawOnRT(SharedRendererState* functor, |
| 70 AwDrawGLInfo& draw_info) { |
| 71 if (browser_view_renderer_->global_visible_rect_for_testing().IsEmpty()) |
| 72 return false; |
| 73 |
| 74 draw_info.width = window_->surface_size().width(); |
| 75 draw_info.height = window_->surface_size().height(); |
| 76 draw_info.is_layer = false; |
| 77 gfx::Transform transform; |
| 78 transform.matrix().asColMajorf(draw_info.transform); |
| 79 return true; |
| 80 } |
| 81 |
| 69 void RenderingTest::OnNewPicture() { | 82 void RenderingTest::OnNewPicture() { |
| 70 } | 83 } |
| 71 | 84 |
| 72 void RenderingTest::PostInvalidate() { | 85 void RenderingTest::PostInvalidate() { |
| 73 window_->PostInvalidate(); | 86 window_->PostInvalidate(); |
| 74 } | 87 } |
| 75 | 88 |
| 76 void RenderingTest::DetachFunctorFromView() { | 89 void RenderingTest::DetachFunctorFromView() { |
| 77 } | 90 } |
| 78 | 91 |
| 79 gfx::Point RenderingTest::GetLocationOnScreen() { | 92 gfx::Point RenderingTest::GetLocationOnScreen() { |
| 80 return gfx::Point(); | 93 return gfx::Point(); |
| 81 } | 94 } |
| 82 | 95 |
| 83 bool RenderingTest::IsFlingActive() const { | 96 bool RenderingTest::IsFlingActive() const { |
| 84 return false; | 97 return false; |
| 85 } | 98 } |
| 86 | 99 |
| 87 } // namespace android_webview | 100 } // namespace android_webview |
| OLD | NEW |