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

Unified Diff: cc/test/fake_output_surface.h

Issue 2443003004: cc: Make OutputSurface::BindToClient pure virtual and not return bool (Closed)
Patch Set: bindtoclient-pure-virtual: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/surfaces/display_unittest.cc ('k') | cc/test/fake_output_surface.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/fake_output_surface.h
diff --git a/cc/test/fake_output_surface.h b/cc/test/fake_output_surface.h
index 674b00a2b06bfaaa9cd310bb8d83b29ac376abd2..b186627a897491e42bcf3957710149ee90e90d3e 100644
--- a/cc/test/fake_output_surface.h
+++ b/cc/test/fake_output_surface.h
@@ -26,8 +26,9 @@ class FakeOutputSurface : public OutputSurface {
~FakeOutputSurface() override;
static std::unique_ptr<FakeOutputSurface> Create3d() {
- return base::WrapUnique(
- new FakeOutputSurface(TestContextProvider::Create()));
+ auto provider = TestContextProvider::Create();
+ provider->BindToCurrentThread();
+ return base::WrapUnique(new FakeOutputSurface(std::move(provider)));
}
static std::unique_ptr<FakeOutputSurface> Create3d(
@@ -35,27 +36,15 @@ class FakeOutputSurface : public OutputSurface {
return base::WrapUnique(new FakeOutputSurface(context_provider));
}
- static std::unique_ptr<FakeOutputSurface> Create3d(
- std::unique_ptr<TestGLES2Interface> gl) {
- return base::WrapUnique(
- new FakeOutputSurface(TestContextProvider::Create(std::move(gl))));
- }
-
- static std::unique_ptr<FakeOutputSurface> Create3d(
- std::unique_ptr<TestWebGraphicsContext3D> context) {
- return base::WrapUnique(
- new FakeOutputSurface(TestContextProvider::Create(std::move(context))));
- }
-
static std::unique_ptr<FakeOutputSurface> CreateSoftware(
std::unique_ptr<SoftwareOutputDevice> software_device) {
return base::WrapUnique(new FakeOutputSurface(std::move(software_device)));
}
static std::unique_ptr<FakeOutputSurface> CreateOffscreen(
- std::unique_ptr<TestWebGraphicsContext3D> context) {
- auto surface = base::WrapUnique(
- new FakeOutputSurface(TestContextProvider::Create(std::move(context))));
+ scoped_refptr<ContextProvider> context_provider) {
+ auto surface =
+ base::WrapUnique(new FakeOutputSurface(std::move(context_provider)));
surface->capabilities_.uses_default_gl_framebuffer = false;
return surface;
}
@@ -69,7 +58,7 @@ class FakeOutputSurface : public OutputSurface {
OutputSurfaceClient* client() { return client_; }
- bool BindToClient(OutputSurfaceClient* client) override;
+ void BindToClient(OutputSurfaceClient* client) override;
void EnsureBackbuffer() override {}
void DiscardBackbuffer() override {}
void BindFramebuffer() override;
« no previous file with comments | « cc/surfaces/display_unittest.cc ('k') | cc/test/fake_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698