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/common/gpu/image_transport_surface_linux.h

Issue 7395020: Create new GLSurface for cross process image transport. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: "" Created 9 years, 5 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/common/gpu/gpu_messages.h ('k') | content/common/gpu/image_transport_surface_linux.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/image_transport_surface_linux.h
diff --git a/content/common/gpu/image_transport_surface_linux.h b/content/common/gpu/image_transport_surface_linux.h
new file mode 100644
index 0000000000000000000000000000000000000000..6ad1d0bcd11affb1ec0e2b7fca742c64c6ba78f9
--- /dev/null
+++ b/content/common/gpu/image_transport_surface_linux.h
@@ -0,0 +1,67 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_LINUX_H_
+#define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_LINUX_H_
+#pragma once
+
+#if defined(ENABLE_GPU)
+
+#include "base/memory/ref_counted.h"
+#include "ipc/ipc_channel.h"
+#include "ipc/ipc_message.h"
+#include "ui/gfx/size.h"
+
+class GpuCommandBufferStub;
+
+namespace gfx {
+class GLSurface;
+}
+
+namespace gpu {
+class GpuScheduler;
+}
+
+class ImageTransportSurface : public IPC::Channel::Listener,
+ public IPC::Message::Sender {
+ public:
+ // Creates the appropriate surface depending on the GL implementation
+ static scoped_refptr<gfx::GLSurface>
+ CreateSurface(GpuCommandBufferStub* stub);
+
+ bool Initialize();
+ void Destroy();
+
+ // IPC::Channel::Listener implementation:
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ // IPC::Message::Sender implementation:
+ virtual bool Send(IPC::Message* msg) OVERRIDE;
+
+ protected:
+ explicit ImageTransportSurface(GpuCommandBufferStub* stub);
+ ~ImageTransportSurface();
+
+ // IPC::Message handlers
+ virtual void OnSetSurfaceACK(uint64 surface_id) = 0;
+ virtual void OnBuffersSwappedACK() = 0;
+
+ // Resize the backbuffer
+ virtual void Resize(gfx::Size size) = 0;
+
+ GpuCommandBufferStub* stub() { return stub_; }
+ gpu::GpuScheduler* scheduler();
+ int32 route_id() { return route_id_; }
+
+ private:
+ // Weak pointer. The stub outlives this surface.
+ GpuCommandBufferStub* stub_;
+ int32 route_id_;
+
+ DISALLOW_COPY_AND_ASSIGN(ImageTransportSurface);
+};
+
+#endif // defined(ENABLE_GPU)
+
+#endif // CONTENT_COMMON_GPU_EGL_IMAGE_TRANSPORT_SURFACE_LINUX_H_
« no previous file with comments | « content/common/gpu/gpu_messages.h ('k') | content/common/gpu/image_transport_surface_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698