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

Unified Diff: ui/compositor/test/in_process_context_factory.cc

Issue 2352963002: cc: Make most of cc::OutputSurface abstract. (Closed)
Patch Set: outputsurface-cleanup: rebase Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/surfaces/direct_output_surface_ozone.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/test/in_process_context_factory.cc
diff --git a/ui/compositor/test/in_process_context_factory.cc b/ui/compositor/test/in_process_context_factory.cc
index 6e54d2f3b5e6d31dfb78fc905c1a331de111ee50..5c3fe0a58a368f017b96193be2cef168afc97cad 100644
--- a/ui/compositor/test/in_process_context_factory.cc
+++ b/ui/compositor/test/in_process_context_factory.cc
@@ -56,6 +56,11 @@ class DirectOutputSurface : public cc::OutputSurface {
~DirectOutputSurface() override {}
// cc::OutputSurface implementation.
+ void EnsureBackbuffer() override {}
+ void DiscardBackbuffer() override {}
+ void BindFramebuffer() override {
+ context_provider()->ContextGL()->BindFramebuffer(GL_FRAMEBUFFER, 0);
+ }
bool BindToClient(cc::OutputSurfaceClient* client) override {
if (!OutputSurface::BindToClient(client))
return false;
@@ -79,15 +84,25 @@ class DirectOutputSurface : public cc::OutputSurface {
gl->GenUnverifiedSyncTokenCHROMIUM(fence_sync, sync_token.GetData());
context_provider_->ContextSupport()->SignalSyncToken(
- sync_token, base::Bind(&OutputSurface::OnSwapBuffersComplete,
+ sync_token, base::Bind(&DirectOutputSurface::OnSwapBuffersComplete,
weak_ptr_factory_.GetWeakPtr()));
}
uint32_t GetFramebufferCopyTextureFormat() override {
auto* gl = static_cast<InProcessContextProvider*>(context_provider());
return gl->GetCopyTextureInternalFormat();
}
+ cc::OverlayCandidateValidator* GetOverlayCandidateValidator() const override {
+ return nullptr;
+ }
+ bool IsDisplayedAsOverlayPlane() const override { return false; }
+ unsigned GetOverlayTextureId() const override { return 0; }
+ bool SurfaceIsSuspendForRecycle() const override { return false; }
+ bool HasExternalStencilTest() const override { return false; }
+ void ApplyExternalStencil() override {}
private:
+ void OnSwapBuffersComplete() { client_->DidSwapBuffersComplete(); }
+
base::WeakPtrFactory<DirectOutputSurface> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(DirectOutputSurface);
« no previous file with comments | « services/ui/surfaces/direct_output_surface_ozone.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698