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

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

Issue 2399983003: cc: Make OutputSurface::Reshape abstract (Closed)
Patch Set: reshapeabstract: . 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 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 969d14b9a050eac9cea443edf63ce1c6aabdf7f4..77c83c01559b81f83ebea01a44c5ad0452ca769e 100644
--- a/ui/compositor/test/in_process_context_factory.cc
+++ b/ui/compositor/test/in_process_context_factory.cc
@@ -56,15 +56,20 @@ class DirectOutputSurface : public cc::OutputSurface {
~DirectOutputSurface() override {}
// cc::OutputSurface implementation.
+ bool BindToClient(cc::OutputSurfaceClient* client) override {
+ return OutputSurface::BindToClient(client);
+ }
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;
- return true;
+ void Reshape(const gfx::Size& size,
+ float device_scale_factor,
+ const gfx::ColorSpace& color_space,
+ bool has_alpha) override {
+ context_provider()->ContextGL()->ResizeCHROMIUM(
+ size.width(), size.height(), device_scale_factor, has_alpha);
}
void SwapBuffers(cc::OutputSurfaceFrame frame) override {
DCHECK(context_provider_.get());
« 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