| Index: cc/test/fake_compositor_frame_sink.cc
|
| diff --git a/cc/test/fake_output_surface.cc b/cc/test/fake_compositor_frame_sink.cc
|
| similarity index 67%
|
| copy from cc/test/fake_output_surface.cc
|
| copy to cc/test/fake_compositor_frame_sink.cc
|
| index e6e7563ee78deb2d9688360aa95cc24dd6abed33..760225faee9b61f187f8dfed079188bb4695bfd9 100644
|
| --- a/cc/test/fake_output_surface.cc
|
| +++ b/cc/test/fake_compositor_frame_sink.cc
|
| @@ -2,40 +2,40 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "cc/test/fake_output_surface.h"
|
| +#include "cc/test/fake_compositor_frame_sink.h"
|
|
|
| #include "base/bind.h"
|
| #include "base/message_loop/message_loop.h"
|
| -#include "cc/output/output_surface_client.h"
|
| +#include "cc/output/compositor_frame_sink_client.h"
|
| #include "cc/resources/returned_resource.h"
|
| #include "cc/test/begin_frame_args_test.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace cc {
|
|
|
| -FakeOutputSurface::FakeOutputSurface(
|
| +FakeCompositorFrameSink::FakeCompositorFrameSink(
|
| scoped_refptr<ContextProvider> context_provider,
|
| scoped_refptr<ContextProvider> worker_context_provider,
|
| bool delegated_rendering)
|
| - : FakeOutputSurface(std::move(context_provider),
|
| - std::move(worker_context_provider),
|
| - nullptr,
|
| - delegated_rendering) {}
|
| + : FakeCompositorFrameSink(std::move(context_provider),
|
| + std::move(worker_context_provider),
|
| + nullptr,
|
| + delegated_rendering) {}
|
|
|
| -FakeOutputSurface::FakeOutputSurface(
|
| +FakeCompositorFrameSink::FakeCompositorFrameSink(
|
| scoped_refptr<ContextProvider> context_provider,
|
| scoped_refptr<ContextProvider> worker_context_provider,
|
| std::unique_ptr<SoftwareOutputDevice> software_device,
|
| bool delegated_rendering)
|
| - : OutputSurface(std::move(context_provider),
|
| - std::move(worker_context_provider),
|
| - std::move(software_device)) {
|
| + : CompositorFrameSink(std::move(context_provider),
|
| + std::move(worker_context_provider),
|
| + std::move(software_device)) {
|
| capabilities_.delegated_rendering = delegated_rendering;
|
| }
|
|
|
| -FakeOutputSurface::~FakeOutputSurface() = default;
|
| +FakeCompositorFrameSink::~FakeCompositorFrameSink() = default;
|
|
|
| -void FakeOutputSurface::SwapBuffers(CompositorFrame frame) {
|
| +void FakeCompositorFrameSink::SwapBuffers(CompositorFrame frame) {
|
| ReturnResourcesHeldByParent();
|
|
|
| last_sent_frame_.reset(new CompositorFrame(std::move(frame)));
|
| @@ -66,24 +66,24 @@ void FakeOutputSurface::SwapBuffers(CompositorFrame frame) {
|
| PostSwapBuffersComplete();
|
| }
|
|
|
| -void FakeOutputSurface::BindFramebuffer() {
|
| +void FakeCompositorFrameSink::BindFramebuffer() {
|
| if (framebuffer_) {
|
| context_provider_->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER,
|
| framebuffer_);
|
| } else {
|
| - OutputSurface::BindFramebuffer();
|
| + CompositorFrameSink::BindFramebuffer();
|
| }
|
| }
|
|
|
| -uint32_t FakeOutputSurface::GetFramebufferCopyTextureFormat() {
|
| +uint32_t FakeCompositorFrameSink::GetFramebufferCopyTextureFormat() {
|
| if (framebuffer_)
|
| return framebuffer_format_;
|
| else
|
| return GL_RGB;
|
| }
|
|
|
| -bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) {
|
| - if (OutputSurface::BindToClient(client)) {
|
| +bool FakeCompositorFrameSink::BindToClient(CompositorFrameSinkClient* client) {
|
| + if (CompositorFrameSink::BindToClient(client)) {
|
| client_ = client;
|
| return true;
|
| } else {
|
| @@ -91,25 +91,25 @@ bool FakeOutputSurface::BindToClient(OutputSurfaceClient* client) {
|
| }
|
| }
|
|
|
| -void FakeOutputSurface::DetachFromClient() {
|
| +void FakeCompositorFrameSink::DetachFromClient() {
|
| ReturnResourcesHeldByParent();
|
| - OutputSurface::DetachFromClient();
|
| + CompositorFrameSink::DetachFromClient();
|
| }
|
|
|
| -bool FakeOutputSurface::HasExternalStencilTest() const {
|
| +bool FakeCompositorFrameSink::HasExternalStencilTest() const {
|
| return has_external_stencil_test_;
|
| }
|
|
|
| -bool FakeOutputSurface::SurfaceIsSuspendForRecycle() const {
|
| +bool FakeCompositorFrameSink::SurfaceIsSuspendForRecycle() const {
|
| return suspended_for_recycle_;
|
| }
|
|
|
| -OverlayCandidateValidator* FakeOutputSurface::GetOverlayCandidateValidator()
|
| - const {
|
| +OverlayCandidateValidator*
|
| +FakeCompositorFrameSink::GetOverlayCandidateValidator() const {
|
| return overlay_candidate_validator_;
|
| }
|
|
|
| -void FakeOutputSurface::ReturnResourcesHeldByParent() {
|
| +void FakeCompositorFrameSink::ReturnResourcesHeldByParent() {
|
| // Check |delegated_frame_data| because we shouldn't reclaim resources
|
| // for the Display which does not swap delegated frames.
|
| if (last_sent_frame_ && last_sent_frame_->delegated_frame_data) {
|
|
|