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 "content/renderer/gpu/render_widget_compositor.h" | 5 #include "content/renderer/gpu/render_widget_compositor.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/location.h" | 9 #include "base/location.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 void DidCompletePageScaleAnimation() override {} | 53 void DidCompletePageScaleAnimation() override {} |
54 void DidCompleteSwapBuffers() override {} | 54 void DidCompleteSwapBuffers() override {} |
55 void ForwardCompositorProto(const std::vector<uint8_t>& proto) override {} | 55 void ForwardCompositorProto(const std::vector<uint8_t>& proto) override {} |
56 bool IsClosing() const override { return false; } | 56 bool IsClosing() const override { return false; } |
57 void OnSwapBuffersAborted() override {} | 57 void OnSwapBuffersAborted() override {} |
58 void OnSwapBuffersComplete() override {} | 58 void OnSwapBuffersComplete() override {} |
59 void OnSwapBuffersPosted() override {} | 59 void OnSwapBuffersPosted() override {} |
60 void RequestScheduleAnimation() override {} | 60 void RequestScheduleAnimation() override {} |
61 void UpdateVisualState() override {} | 61 void UpdateVisualState() override {} |
62 void WillBeginCompositorFrame() override {} | 62 void WillBeginCompositorFrame() override {} |
63 void ReportFixedRasterScaleUseCounters( | |
64 bool has_blurry_content, | |
65 bool has_potential_performance_regression) override {} | |
66 }; | 63 }; |
67 | 64 |
68 class FakeRenderWidgetCompositorDelegate | 65 class FakeRenderWidgetCompositorDelegate |
69 : public StubRenderWidgetCompositorDelegate { | 66 : public StubRenderWidgetCompositorDelegate { |
70 public: | 67 public: |
71 FakeRenderWidgetCompositorDelegate() = default; | 68 FakeRenderWidgetCompositorDelegate() = default; |
72 | 69 |
73 std::unique_ptr<cc::OutputSurface> CreateOutputSurface( | 70 std::unique_ptr<cc::OutputSurface> CreateOutputSurface( |
74 bool fallback) override { | 71 bool fallback) override { |
75 EXPECT_EQ( | 72 EXPECT_EQ( |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 } | 288 } |
292 | 289 |
293 TEST_F(RenderWidgetCompositorOutputSurfaceTest, FallbackSuccessNormalSuccess) { | 290 TEST_F(RenderWidgetCompositorOutputSurfaceTest, FallbackSuccessNormalSuccess) { |
294 // The first success is a fallback, but the next should not be a fallback. | 291 // The first success is a fallback, but the next should not be a fallback. |
295 RunTest(false, RenderWidgetCompositor::OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK, | 292 RunTest(false, RenderWidgetCompositor::OUTPUT_SURFACE_RETRIES_BEFORE_FALLBACK, |
296 1, 1); | 293 1, 1); |
297 } | 294 } |
298 | 295 |
299 } // namespace | 296 } // namespace |
300 } // namespace content | 297 } // namespace content |
OLD | NEW |