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

Unified Diff: content/browser/gpu/gpu_process_host.cc

Issue 7006006: Replace OS_LINUX ifdefs with OS_POSIX & !OS_MACOSX, TOOLKIT_USES_GTK, or (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 years, 7 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/gpu/gpu_process_host.h ('k') | content/browser/gpu/gpu_process_host_ui_shim.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.cc
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 343d4591e8828d84c650963161efd3c28f048235..677809572393ec4ee22cc3e42c5e9102948199f7 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -27,9 +27,9 @@
#include "ui/gfx/gl/gl_context.h"
#include "ui/gfx/gl/gl_switches.h"
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_USES_GTK)
#include "ui/gfx/gtk_native_view_id_manager.h"
-#endif // defined(OS_LINUX)
+#endif
namespace {
@@ -54,7 +54,7 @@ static const int kGpuMaxCrashCount = 3;
int g_last_host_id = 0;
-#if defined(OS_LINUX)
+#if defined(TOOLKIT_USES_GTK)
class ReleasePermanentXIDDispatcher: public Task {
public:
@@ -90,7 +90,7 @@ void SendGpuProcessMessage(int renderer_id,
} // anonymous namespace
-#if defined(OS_LINUX) && !defined(TOUCH_UI)
+#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI)
// Used to put a lock on surfaces so that the window to which the GPU
// process is drawing to doesn't disappear while it is drawing when
// a tab is closed.
@@ -115,7 +115,7 @@ GpuProcessHost::SurfaceRef::~SurfaceRef() {
FROM_HERE,
new ReleasePermanentXIDDispatcher(surface_));
}
-#endif // defined(OS_LINUX) && !defined(TOUCH_UI)
+#endif // defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI)
// This class creates a GPU thread (instead of a GPU process), when running
// with --in-process-gpu or --single-process.
@@ -378,7 +378,7 @@ void GpuProcessHost::CreateViewCommandBuffer(
DCHECK(CalledOnValidThread());
linked_ptr<CreateCommandBufferCallback> wrapped_callback(callback);
-#if defined(OS_LINUX) && !defined(TOUCH_UI)
+#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI)
ViewID view_id(renderer_id, render_view_id);
// There should only be one such command buffer (for the compositor). In
@@ -391,16 +391,16 @@ void GpuProcessHost::CreateViewCommandBuffer(
surface_ref = (*it).second;
else
surface_ref.reset(new SurfaceRef(compositing_surface));
-#endif // defined(OS_LINUX) && defined(TOUCH_UI)
+#endif // defined(TOOLKIT_USES_GTK) && defined(TOUCH_UI)
if (compositing_surface != gfx::kNullPluginWindow &&
Send(new GpuMsg_CreateViewCommandBuffer(
compositing_surface, render_view_id, renderer_id, init_params))) {
create_command_buffer_requests_.push(wrapped_callback);
-#if defined(OS_LINUX) && !defined(TOUCH_UI)
+#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI)
surface_refs_.insert(std::pair<ViewID, linked_ptr<SurfaceRef> >(
view_id, surface_ref));
-#endif // defined(OS_LINUX) && !defined(TOUCH_UI)
+#endif
} else {
CreateCommandBufferError(wrapped_callback.release(), MSG_ROUTING_NONE);
}
@@ -459,12 +459,12 @@ void GpuProcessHost::OnCommandBufferCreated(const int32 route_id) {
void GpuProcessHost::OnDestroyCommandBuffer(
gfx::PluginWindowHandle window, int32 renderer_id,
int32 render_view_id) {
-#if defined(OS_LINUX) && !defined(TOUCH_UI)
+#if defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI)
ViewID view_id(renderer_id, render_view_id);
SurfaceRefMap::iterator it = surface_refs_.find(view_id);
if (it != surface_refs_.end())
surface_refs_.erase(it);
-#endif // defined(OS_LINUX) && !defined(TOUCH_UI)
+#endif // defined(TOOLKIT_USES_GTK) && !defined(TOUCH_UI)
}
void GpuProcessHost::OnGraphicsInfoCollected(const GPUInfo& gpu_info) {
« no previous file with comments | « content/browser/gpu/gpu_process_host.h ('k') | content/browser/gpu/gpu_process_host_ui_shim.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698