| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/android/synchronous_compositor_frame_sink.h" | 5 #include "content/renderer/android/synchronous_compositor_frame_sink.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| 11 #include "base/logging.h" | 11 #include "base/logging.h" |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
| 15 #include "base/threading/thread_task_runner_handle.h" | 15 #include "base/threading/thread_task_runner_handle.h" |
| 16 #include "cc/output/compositor_frame.h" | 16 #include "cc/output/compositor_frame.h" |
| 17 #include "cc/output/compositor_frame_sink_client.h" | 17 #include "cc/output/compositor_frame_sink_client.h" |
| 18 #include "cc/output/context_provider.h" | 18 #include "cc/output/context_provider.h" |
| 19 #include "cc/output/output_surface.h" | 19 #include "cc/output/output_surface.h" |
| 20 #include "cc/output/output_surface_frame.h" |
| 20 #include "cc/output/renderer_settings.h" | 21 #include "cc/output/renderer_settings.h" |
| 21 #include "cc/output/software_output_device.h" | 22 #include "cc/output/software_output_device.h" |
| 22 #include "cc/output/texture_mailbox_deleter.h" | 23 #include "cc/output/texture_mailbox_deleter.h" |
| 23 #include "cc/quads/render_pass.h" | 24 #include "cc/quads/render_pass.h" |
| 24 #include "cc/quads/surface_draw_quad.h" | 25 #include "cc/quads/surface_draw_quad.h" |
| 25 #include "cc/surfaces/display.h" | 26 #include "cc/surfaces/display.h" |
| 26 #include "cc/surfaces/surface_factory.h" | 27 #include "cc/surfaces/surface_factory.h" |
| 27 #include "cc/surfaces/surface_id_allocator.h" | 28 #include "cc/surfaces/surface_id_allocator.h" |
| 28 #include "cc/surfaces/surface_manager.h" | 29 #include "cc/surfaces/surface_manager.h" |
| 29 #include "content/common/android/sync_compositor_messages.h" | 30 #include "content/common/android/sync_compositor_messages.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 class SynchronousCompositorFrameSink::SoftwareOutputSurface | 77 class SynchronousCompositorFrameSink::SoftwareOutputSurface |
| 77 : public cc::OutputSurface { | 78 : public cc::OutputSurface { |
| 78 public: | 79 public: |
| 79 SoftwareOutputSurface(std::unique_ptr<SoftwareDevice> software_device) | 80 SoftwareOutputSurface(std::unique_ptr<SoftwareDevice> software_device) |
| 80 : cc::OutputSurface(std::move(software_device)) {} | 81 : cc::OutputSurface(std::move(software_device)) {} |
| 81 | 82 |
| 82 // cc::OutputSurface implementation. | 83 // cc::OutputSurface implementation. |
| 83 void EnsureBackbuffer() override {} | 84 void EnsureBackbuffer() override {} |
| 84 void DiscardBackbuffer() override {} | 85 void DiscardBackbuffer() override {} |
| 85 void BindFramebuffer() override {} | 86 void BindFramebuffer() override {} |
| 86 void SwapBuffers(cc::CompositorFrame frame) override {} | 87 void SwapBuffers(cc::OutputSurfaceFrame frame) override {} |
| 87 void Reshape(const gfx::Size& size, | 88 void Reshape(const gfx::Size& size, |
| 88 float scale_factor, | 89 float scale_factor, |
| 89 const gfx::ColorSpace& color_space, | 90 const gfx::ColorSpace& color_space, |
| 90 bool has_alpha) override { | 91 bool has_alpha) override { |
| 91 surface_size_ = size; | 92 surface_size_ = size; |
| 92 } | 93 } |
| 93 uint32_t GetFramebufferCopyTextureFormat() override { return 0; } | 94 uint32_t GetFramebufferCopyTextureFormat() override { return 0; } |
| 94 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override { | 95 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override { |
| 95 return nullptr; | 96 return nullptr; |
| 96 } | 97 } |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 464 client_->ReclaimResources(resources); | 465 client_->ReclaimResources(resources); |
| 465 } | 466 } |
| 466 | 467 |
| 467 void SynchronousCompositorFrameSink::SetBeginFrameSource( | 468 void SynchronousCompositorFrameSink::SetBeginFrameSource( |
| 468 cc::BeginFrameSource* begin_frame_source) { | 469 cc::BeginFrameSource* begin_frame_source) { |
| 469 // Software output is synchronous and doesn't use a BeginFrameSource. | 470 // Software output is synchronous and doesn't use a BeginFrameSource. |
| 470 NOTREACHED(); | 471 NOTREACHED(); |
| 471 } | 472 } |
| 472 | 473 |
| 473 } // namespace content | 474 } // namespace content |
| OLD | NEW |