| 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 <map> | 5 #include <map> |
| 6 #include <queue> | 6 #include <queue> |
| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 return false; | 116 return false; |
| 117 | 117 |
| 118 return !constraints1.is_layer || | 118 return !constraints1.is_layer || |
| 119 constraints1.surface_rect_empty == constraints2.surface_rect_empty; | 119 constraints1.surface_rect_empty == constraints2.surface_rect_empty; |
| 120 } | 120 } |
| 121 | 121 |
| 122 void OnParentDrawConstraintsUpdated() override { | 122 void OnParentDrawConstraintsUpdated() override { |
| 123 ParentCompositorDrawConstraints constraints = | 123 ParentCompositorDrawConstraints constraints = |
| 124 GetCompositorFrameConsumer()->GetParentDrawConstraintsOnUI(); | 124 GetCompositorFrameConsumer()->GetParentDrawConstraintsOnUI(); |
| 125 switch (on_draw_count_) { | 125 switch (on_draw_count_) { |
| 126 case 0u: |
| 127 EXPECT_TRUE(DrawConstraintsEquals(constraints, initial_constraints_)); |
| 128 break; |
| 126 case 1u: | 129 case 1u: |
| 127 EXPECT_TRUE(DrawConstraintsEquals(constraints, new_constraints_)); | 130 EXPECT_TRUE(DrawConstraintsEquals(constraints, new_constraints_)); |
| 128 break; | 131 break; |
| 129 case 3u: | 132 case 3u: |
| 130 EXPECT_TRUE(DrawConstraintsEquals(constraints, initial_constraints_)); | 133 EXPECT_TRUE(DrawConstraintsEquals(constraints, initial_constraints_)); |
| 131 EndTest(); | 134 EndTest(); |
| 132 break; | 135 break; |
| 133 // There will be a following 4th onDraw. But the hardware renderer won't | 136 // There will be a following 4th onDraw. But the hardware renderer won't |
| 134 // post back the draw constraints in DrawGL because the constraints | 137 // post back the draw constraints in DrawGL because the constraints |
| 135 // don't change. | 138 // don't change. |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 EndTest(); | 343 EndTest(); |
| 341 } | 344 } |
| 342 | 345 |
| 343 private: | 346 private: |
| 344 OutputSurfaceResourceCountMap expected_return_count_; | 347 OutputSurfaceResourceCountMap expected_return_count_; |
| 345 }; | 348 }; |
| 346 | 349 |
| 347 RENDERING_TEST_F(RenderThreadManagerDeletionTest); | 350 RENDERING_TEST_F(RenderThreadManagerDeletionTest); |
| 348 | 351 |
| 349 } // namespace android_webview | 352 } // namespace android_webview |
| OLD | NEW |