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

Unified Diff: content/browser/compositor/image_transport_factory_browsertest.cc

Issue 227683006: Remove ImageTransportFactory::CreateTransportClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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
Index: content/browser/compositor/image_transport_factory_browsertest.cc
diff --git a/content/browser/compositor/image_transport_factory_browsertest.cc b/content/browser/compositor/image_transport_factory_browsertest.cc
index 13998b529d03d6a4c01a2e193b4a491912e0fcae..2101a2f452a587b77d4c6d9f929ed6c27e19dd3a 100644
--- a/content/browser/compositor/image_transport_factory_browsertest.cc
+++ b/content/browser/compositor/image_transport_factory_browsertest.cc
@@ -38,7 +38,14 @@ IN_PROC_BROWSER_TEST_F(ImageTransportFactoryBrowserTest,
return;
ImageTransportFactory* factory = ImageTransportFactory::GetInstance();
- scoped_refptr<ui::Texture> texture = factory->CreateTransportClient(1.f);
+ ui::ContextFactory* context_factory = ui::ContextFactory::GetInstance();
+ gpu::gles2::GLES2Interface* gl =
+ context_factory->SharedMainThreadContextProvider()->ContextGL();
+ unsigned int texture_id = 0;
danakj 2014/04/08 14:34:18 nit: uint32?
piman 2014/04/08 17:34:22 Made it a GLuint, which is what GenTextures takes.
+ gl->GenTextures(1, &texture_id);
+
+ scoped_refptr<ui::Texture> texture =
+ factory->CreateOwnedTexture(gfx::Size(1, 1), 1.f, texture_id);
ASSERT_TRUE(texture.get());
MockImageTransportFactoryObserver observer;
@@ -48,10 +55,6 @@ IN_PROC_BROWSER_TEST_F(ImageTransportFactoryBrowserTest,
EXPECT_CALL(observer, OnLostResources())
.WillOnce(testing::InvokeWithoutArgs(&run_loop, &base::RunLoop::Quit));
- ui::ContextFactory* context_factory = ui::ContextFactory::GetInstance();
-
- gpu::gles2::GLES2Interface* gl =
- context_factory->SharedMainThreadContextProvider()->ContextGL();
gl->LoseContextCHROMIUM(GL_GUILTY_CONTEXT_RESET_ARB,
GL_INNOCENT_CONTEXT_RESET_ARB);

Powered by Google App Engine
This is Rietveld 408576698