| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 CreateTestValidatorOzone()) { | 86 CreateTestValidatorOzone()) { |
| 87 surface_size_ = gfx::Size(256, 256); | 87 surface_size_ = gfx::Size(256, 256); |
| 88 device_scale_factor_ = 1.f; | 88 device_scale_factor_ = 1.f; |
| 89 } | 89 } |
| 90 | 90 |
| 91 void SetFlip(bool flip) { capabilities_.flipped_output_surface = flip; } | 91 void SetFlip(bool flip) { capabilities_.flipped_output_surface = flip; } |
| 92 | 92 |
| 93 void EnsureBackbuffer() override {} | 93 void EnsureBackbuffer() override {} |
| 94 void DiscardBackbuffer() override {} | 94 void DiscardBackbuffer() override {} |
| 95 void BindFramebuffer() override {} | 95 void BindFramebuffer() override {} |
| 96 void SwapBuffers(cc::CompositorFrame frame) override {} | 96 void SwapBuffers(cc::OutputSurfaceFrame frame) override {} |
| 97 uint32_t GetFramebufferCopyTextureFormat() override { return GL_RGB; } | 97 uint32_t GetFramebufferCopyTextureFormat() override { return GL_RGB; } |
| 98 bool IsDisplayedAsOverlayPlane() const override { return false; } | 98 bool IsDisplayedAsOverlayPlane() const override { return false; } |
| 99 unsigned GetOverlayTextureId() const override { return 0; } | 99 unsigned GetOverlayTextureId() const override { return 0; } |
| 100 bool SurfaceIsSuspendForRecycle() const override { return false; } | 100 bool SurfaceIsSuspendForRecycle() const override { return false; } |
| 101 | 101 |
| 102 void OnReflectorChanged() override { | 102 void OnReflectorChanged() override { |
| 103 if (!reflector_) { | 103 if (!reflector_) { |
| 104 reflector_texture_.reset(); | 104 reflector_texture_.reset(); |
| 105 } else { | 105 } else { |
| 106 reflector_texture_.reset(new ReflectorTexture(context_provider())); | 106 reflector_texture_.reset(new ReflectorTexture(context_provider())); |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 plane_2.plane_z_order = 1; | 232 plane_2.plane_z_order = 1; |
| 233 list.push_back(plane_1); | 233 list.push_back(plane_1); |
| 234 list.push_back(plane_2); | 234 list.push_back(plane_2); |
| 235 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); | 235 output_surface_->GetOverlayCandidateValidator()->CheckOverlaySupport(&list); |
| 236 EXPECT_FALSE(list[0].overlay_handled); | 236 EXPECT_FALSE(list[0].overlay_handled); |
| 237 } | 237 } |
| 238 #endif // defined(USE_OZONE) | 238 #endif // defined(USE_OZONE) |
| 239 | 239 |
| 240 } // namespace | 240 } // namespace |
| 241 } // namespace content | 241 } // namespace content |
| OLD | NEW |