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

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

Issue 227683006: Remove ImageTransportFactory::CreateTransportClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use GLuint 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
« no previous file with comments | « content/browser/compositor/no_transport_image_transport_factory.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/no_transport_image_transport_factory.cc
diff --git a/content/browser/compositor/no_transport_image_transport_factory.cc b/content/browser/compositor/no_transport_image_transport_factory.cc
index 48f8282480d1de73dfa26b1584ee6225ff156d70..fd56b689be849e667bf50a65b0c95e7ec6c7fd73 100644
--- a/content/browser/compositor/no_transport_image_transport_factory.cc
+++ b/content/browser/compositor/no_transport_image_transport_factory.cc
@@ -11,45 +11,6 @@
namespace content {
-namespace {
-
-class FakeTexture : public ui::Texture {
- public:
- FakeTexture(scoped_refptr<cc::ContextProvider> context_provider,
- float device_scale_factor)
- : ui::Texture(false, gfx::Size(), device_scale_factor),
- context_provider_(context_provider),
- texture_(0u) {
- context_provider_->ContextGL()->GenTextures(1, &texture_);
- }
-
- virtual unsigned int PrepareTexture() OVERRIDE { return texture_; }
-
- virtual void Consume(const gpu::Mailbox& mailbox,
- const gfx::Size& new_size) OVERRIDE {
- if (mailbox.IsZero())
- return;
-
- DCHECK(context_provider_ && texture_);
- gpu::gles2::GLES2Interface* gl = context_provider_->ContextGL();
- gl->BindTexture(GL_TEXTURE_2D, texture_);
- gl->ConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
- size_ = new_size;
- gl->ShallowFlushCHROMIUM();
- }
-
- private:
- virtual ~FakeTexture() {
- context_provider_->ContextGL()->DeleteTextures(1, &texture_);
- }
-
- scoped_refptr<cc::ContextProvider> context_provider_;
- unsigned texture_;
- DISALLOW_COPY_AND_ASSIGN(FakeTexture);
-};
-
-} // anonymous namespace
-
NoTransportImageTransportFactory::NoTransportImageTransportFactory(
scoped_ptr<ui::ContextFactory> context_factory)
: context_factory_(context_factory.Pass()) {}
@@ -65,13 +26,6 @@ NoTransportImageTransportFactory::GetSharedSurfaceHandle() {
return gfx::GLSurfaceHandle();
}
-scoped_refptr<ui::Texture>
-NoTransportImageTransportFactory::CreateTransportClient(
- float device_scale_factor) {
- return new FakeTexture(context_factory_->SharedMainThreadContextProvider(),
- device_scale_factor);
-}
-
scoped_refptr<ui::Texture> NoTransportImageTransportFactory::CreateOwnedTexture(
const gfx::Size& size,
float device_scale_factor,
« no previous file with comments | « content/browser/compositor/no_transport_image_transport_factory.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698