| 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 void RenderingTest::SetParentDrawConstraints(AwDrawGLInfo& draw_info) { |
| 70 draw_info.width = window_->surface_size().width(); |
| 71 draw_info.height = window_->surface_size().height(); |
| 72 draw_info.is_layer = false; |
| 73 gfx::Transform transform; |
| 74 transform.matrix().asColMajorf(draw_info.transform); |
| 75 } |
| 76 |
| 77 bool RenderingTest::WillWaitForModeDrawToFinish() { |
| 78 return false; |
| 79 } |
| 80 bool RenderingTest::WillDrawOnRT(SharedRendererState* functor) { |
| 81 return true; |
| 82 } |
| 83 |
| 69 void RenderingTest::OnNewPicture() { | 84 void RenderingTest::OnNewPicture() { |
| 70 } | 85 } |
| 71 | 86 |
| 72 void RenderingTest::PostInvalidate() { | 87 void RenderingTest::PostInvalidate() { |
| 73 window_->PostInvalidate(); | 88 window_->PostInvalidate(); |
| 74 } | 89 } |
| 75 | 90 |
| 76 void RenderingTest::DetachFunctorFromView() { | 91 void RenderingTest::DetachFunctorFromView() { |
| 77 } | 92 } |
| 78 | 93 |
| 79 gfx::Point RenderingTest::GetLocationOnScreen() { | 94 gfx::Point RenderingTest::GetLocationOnScreen() { |
| 80 return gfx::Point(); | 95 return gfx::Point(); |
| 81 } | 96 } |
| 82 | 97 |
| 83 bool RenderingTest::IsFlingActive() const { | 98 bool RenderingTest::IsFlingActive() const { |
| 84 return false; | 99 return false; |
| 85 } | 100 } |
| 86 | 101 |
| 87 } // namespace android_webview | 102 } // namespace android_webview |
| OLD | NEW |