Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: content/renderer/android/synchronous_compositor_frame_sink.cc

Issue 2352963002: cc: Make most of cc::OutputSurface abstract. (Closed)
Patch Set: outputsurface-cleanup: rebase Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 } // namespace 72 } // namespace
73 73
74 class SynchronousCompositorFrameSink::SoftwareOutputSurface 74 class SynchronousCompositorFrameSink::SoftwareOutputSurface
75 : public cc::OutputSurface { 75 : public cc::OutputSurface {
76 public: 76 public:
77 SoftwareOutputSurface(std::unique_ptr<SoftwareDevice> software_device) 77 SoftwareOutputSurface(std::unique_ptr<SoftwareDevice> software_device)
78 : cc::OutputSurface(std::move(software_device)) {} 78 : cc::OutputSurface(std::move(software_device)) {}
79 79
80 // cc::OutputSurface implementation. 80 // cc::OutputSurface implementation.
81 uint32_t GetFramebufferCopyTextureFormat() override { return 0; } 81 void EnsureBackbuffer() override {}
82 void DiscardBackbuffer() override {}
83 void BindFramebuffer() override {}
82 void SwapBuffers(cc::CompositorFrame frame) override {} 84 void SwapBuffers(cc::CompositorFrame frame) override {}
83 void Reshape(const gfx::Size& size, 85 void Reshape(const gfx::Size& size,
84 float scale_factor, 86 float scale_factor,
85 const gfx::ColorSpace& color_space, 87 const gfx::ColorSpace& color_space,
86 bool has_alpha) override { 88 bool has_alpha) override {
87 // Intentional no-op. Surface size controlled by embedder. 89 // Intentional no-op. Surface size controlled by embedder.
88 } 90 }
91 uint32_t GetFramebufferCopyTextureFormat() override { return 0; }
92 cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override {
93 return nullptr;
94 }
95 bool IsDisplayedAsOverlayPlane() const override { return false; }
96 unsigned GetOverlayTextureId() const override { return 0; }
97 bool SurfaceIsSuspendForRecycle() const override { return false; }
98 bool HasExternalStencilTest() const override { return false; }
99 void ApplyExternalStencil() override {}
89 100
90 void SetSurfaceSize(const gfx::Size surface_size) { 101 void SetSurfaceSize(const gfx::Size surface_size) {
91 surface_size_ = surface_size; 102 surface_size_ = surface_size;
92 } 103 }
93 }; 104 };
94 105
95 SynchronousCompositorFrameSink::SynchronousCompositorFrameSink( 106 SynchronousCompositorFrameSink::SynchronousCompositorFrameSink(
96 scoped_refptr<cc::ContextProvider> context_provider, 107 scoped_refptr<cc::ContextProvider> context_provider,
97 scoped_refptr<cc::ContextProvider> worker_context_provider, 108 scoped_refptr<cc::ContextProvider> worker_context_provider,
98 int routing_id, 109 int routing_id,
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 client_->ReclaimResources(resources); 413 client_->ReclaimResources(resources);
403 } 414 }
404 415
405 void SynchronousCompositorFrameSink::SetBeginFrameSource( 416 void SynchronousCompositorFrameSink::SetBeginFrameSource(
406 cc::BeginFrameSource* begin_frame_source) { 417 cc::BeginFrameSource* begin_frame_source) {
407 // Software output is synchronous and doesn't use a BeginFrameSource. 418 // Software output is synchronous and doesn't use a BeginFrameSource.
408 NOTREACHED(); 419 NOTREACHED();
409 } 420 }
410 421
411 } // namespace content 422 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositor_impl_android.cc ('k') | services/ui/surfaces/direct_output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698