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

Unified Diff: content/browser/compositor/gpu_process_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
Index: content/browser/compositor/gpu_process_transport_factory.cc
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc
index 3add5c6304d07a60ebb8358ed72001909ca3ee51..5ac65d93a1bdd41a2ce07ffbd0e19d00d98d505c 100644
--- a/content/browser/compositor/gpu_process_transport_factory.cc
+++ b/content/browser/compositor/gpu_process_transport_factory.cc
@@ -106,40 +106,6 @@ class OwnedTexture : public ui::Texture, ImageTransportFactoryObserver {
DISALLOW_COPY_AND_ASSIGN(OwnedTexture);
};
-class ImageTransportClientTexture : public OwnedTexture {
- public:
- ImageTransportClientTexture(const scoped_refptr<ContextProvider>& provider,
- float device_scale_factor,
- GLuint texture_id)
- : OwnedTexture(provider,
- gfx::Size(0, 0),
- device_scale_factor,
- texture_id) {}
-
- virtual void Consume(const gpu::Mailbox& mailbox,
- const gfx::Size& new_size) OVERRIDE {
- mailbox_ = mailbox;
- if (mailbox.IsZero())
- return;
-
- DCHECK(provider_ && texture_id_);
- GLES2Interface* gl = provider_->ContextGL();
- gl->BindTexture(GL_TEXTURE_2D, texture_id_);
- gl->ConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
- size_ = new_size;
- gl->ShallowFlushCHROMIUM();
- }
-
- virtual gpu::Mailbox Produce() OVERRIDE { return mailbox_; }
-
- protected:
- virtual ~ImageTransportClientTexture() {}
-
- private:
- gpu::Mailbox mailbox_;
- DISALLOW_COPY_AND_ASSIGN(ImageTransportClientTexture);
-};
-
GpuProcessTransportFactory::GpuProcessTransportFactory()
: callback_factory_(this), offscreen_content_bound_to_other_thread_(false) {
output_surface_proxy_ = new BrowserCompositorOutputSurfaceProxy(
@@ -324,20 +290,6 @@ gfx::GLSurfaceHandle GpuProcessTransportFactory::GetSharedSurfaceHandle() {
return handle;
}
-scoped_refptr<ui::Texture> GpuProcessTransportFactory::CreateTransportClient(
- float device_scale_factor) {
- scoped_refptr<cc::ContextProvider> provider =
- SharedMainThreadContextProvider();
- if (!provider.get())
- return NULL;
- GLuint texture_id = 0;
- provider->ContextGL()->GenTextures(1, &texture_id);
- scoped_refptr<ImageTransportClientTexture> image(
- new ImageTransportClientTexture(
- provider, device_scale_factor, texture_id));
- return image;
-}
-
scoped_refptr<ui::Texture> GpuProcessTransportFactory::CreateOwnedTexture(
const gfx::Size& size,
float device_scale_factor,
« no previous file with comments | « content/browser/compositor/gpu_process_transport_factory.h ('k') | content/browser/compositor/image_transport_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698