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

Unified Diff: content/common/gpu/image_transport_surface.h

Issue 1846253003: Revert of Refactor content/common/gpu into gpu/ipc/service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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_watchdog.h ('k') | content/common/gpu/image_transport_surface_android.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.h
diff --git a/content/common/gpu/image_transport_surface.h b/content/common/gpu/image_transport_surface.h
new file mode 100644
index 0000000000000000000000000000000000000000..8cb29677e5221cd701c192ccf032e65cabfc08d8
--- /dev/null
+++ b/content/common/gpu/image_transport_surface.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2012 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_H_
+#define CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
+
+#include <stdint.h>
+
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "build/build_config.h"
+#include "content/common/content_export.h"
+#include "gpu/ipc/common/surface_handle.h"
+#include "ui/gl/gl_surface.h"
+
+namespace content {
+class GpuChannelManager;
+class GpuCommandBufferStub;
+
+// The GPU process is agnostic as to how it displays results. On some platforms
+// it renders directly to window. On others it renders offscreen and transports
+// the results to the browser process to display. This file provides a simple
+// framework for making the offscreen path seem more like the onscreen path.
+
+class ImageTransportSurface {
+ public:
+#if defined(OS_MACOSX)
+ CONTENT_EXPORT static void SetAllowOSMesaForTesting(bool allow);
+#endif
+
+ // Creates the appropriate native surface depending on the GL implementation.
+ // This will be implemented separately by each platform. On failure, a null
+ // scoped_refptr should be returned.
+ static scoped_refptr<gfx::GLSurface> CreateNativeSurface(
+ GpuChannelManager* manager,
+ GpuCommandBufferStub* stub,
+ gpu::SurfaceHandle surface_handle,
+ gfx::GLSurface::Format format);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ImageTransportSurface);
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_IMAGE_TRANSPORT_SURFACE_H_
« no previous file with comments | « content/common/gpu/gpu_watchdog.h ('k') | content/common/gpu/image_transport_surface_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698