| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "base/memory/ptr_util.h" | 5 #include "base/memory/ptr_util.h" |
| 6 #include "base/run_loop.h" | 6 #include "base/run_loop.h" |
| 7 #include "base/single_thread_task_runner.h" | 7 #include "base/single_thread_task_runner.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "cc/output/compositor_frame.h" | 9 #include "cc/output/output_surface_frame.h" |
| 10 #include "cc/scheduler/begin_frame_source.h" | 10 #include "cc/scheduler/begin_frame_source.h" |
| 11 #include "cc/scheduler/delay_based_time_source.h" | 11 #include "cc/scheduler/delay_based_time_source.h" |
| 12 #include "cc/test/fake_output_surface_client.h" | 12 #include "cc/test/fake_output_surface_client.h" |
| 13 #include "cc/test/test_context_provider.h" | 13 #include "cc/test/test_context_provider.h" |
| 14 #include "cc/test/test_web_graphics_context_3d.h" | 14 #include "cc/test/test_web_graphics_context_3d.h" |
| 15 #include "components/display_compositor/compositor_overlay_candidate_validator.h
" | 15 #include "components/display_compositor/compositor_overlay_candidate_validator.h
" |
| 16 #include "content/browser/compositor/browser_compositor_output_surface.h" | 16 #include "content/browser/compositor/browser_compositor_output_surface.h" |
| 17 #include "content/browser/compositor/reflector_impl.h" | 17 #include "content/browser/compositor/reflector_impl.h" |
| 18 #include "content/browser/compositor/reflector_texture.h" | 18 #include "content/browser/compositor/reflector_texture.h" |
| 19 #include "content/browser/compositor/test/no_transport_image_transport_factory.h
" | 19 #include "content/browser/compositor/test/no_transport_image_transport_factory.h
" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 begin_frame_source, | 85 begin_frame_source, |
| 86 CreateTestValidatorOzone()) { | 86 CreateTestValidatorOzone()) { |
| 87 device_scale_factor_ = 1.f; | 87 device_scale_factor_ = 1.f; |
| 88 } | 88 } |
| 89 | 89 |
| 90 void SetFlip(bool flip) { capabilities_.flipped_output_surface = flip; } | 90 void SetFlip(bool flip) { capabilities_.flipped_output_surface = flip; } |
| 91 | 91 |
| 92 void EnsureBackbuffer() override {} | 92 void EnsureBackbuffer() override {} |
| 93 void DiscardBackbuffer() override {} | 93 void DiscardBackbuffer() override {} |
| 94 void BindFramebuffer() override {} | 94 void BindFramebuffer() override {} |
| 95 void SwapBuffers(cc::CompositorFrame frame) override {} | 95 void SwapBuffers(cc::OutputSurfaceFrame frame) override {} |
| 96 uint32_t GetFramebufferCopyTextureFormat() override { return GL_RGB; } | 96 uint32_t GetFramebufferCopyTextureFormat() override { return GL_RGB; } |
| 97 bool IsDisplayedAsOverlayPlane() const override { return false; } | 97 bool IsDisplayedAsOverlayPlane() const override { return false; } |
| 98 unsigned GetOverlayTextureId() const override { return 0; } | 98 unsigned GetOverlayTextureId() const override { return 0; } |
| 99 bool SurfaceIsSuspendForRecycle() const override { return false; } | 99 bool SurfaceIsSuspendForRecycle() const override { return false; } |
| 100 | 100 |
| 101 void OnReflectorChanged() override { | 101 void OnReflectorChanged() override { |
| 102 if (!reflector_) { | 102 if (!reflector_) { |
| 103 reflector_texture_.reset(); | 103 reflector_texture_.reset(); |
| 104 } else { | 104 } else { |
| 105 reflector_texture_.reset(new ReflectorTexture(context_provider())); | 105 reflector_texture_.reset(new ReflectorTexture(context_provider())); |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 plane_2.plane_z_order = 1; | 233 plane_2.plane_z_order = 1; |
| 234 list.push_back(plane_1); | 234 list.push_back(plane_1); |
| 235 list.push_back(plane_2); | 235 list.push_back(plane_2); |
| 236 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); | 236 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); |
| 237 EXPECT_FALSE(list[0].overlay_handled); | 237 EXPECT_FALSE(list[0].overlay_handled); |
| 238 } | 238 } |
| 239 #endif // defined(USE_OZONE) | 239 #endif // defined(USE_OZONE) |
| 240 | 240 |
| 241 } // namespace | 241 } // namespace |
| 242 } // namespace content | 242 } // namespace content |
| OLD | NEW |