Add ifdefs to fix desktop build.
authorAli Juma <ajuma@mozilla.com>
Fri, 03 Feb 2012 21:48:05 -0500
changeset 92385 e1f70b352cad41eaf7377f6566ab6723e7c59a47
parent 92384 72ee03c1e571ed3e4fb5795a2aa16c7e800dc9f3
child 92386 d678113069ca2b8d5b9e96596576cc4526d6a049
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone12.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Add ifdefs to fix desktop build.
gfx/layers/ipc/CompositorParent.cpp
gfx/layers/opengl/LayerManagerOGL.cpp
--- a/gfx/layers/ipc/CompositorParent.cpp
+++ b/gfx/layers/ipc/CompositorParent.cpp
@@ -40,20 +40,19 @@
 
 #include "CompositorParent.h"
 #include "ShadowLayersParent.h"
 #include "LayerManagerOGL.h"
 #include "nsIWidget.h"
 
 #if defined(MOZ_WIDGET_ANDROID)
 #include "AndroidBridge.h"
+#include <android/log.h>
 #endif
 
-#include <android/log.h>
-
 namespace mozilla {
 namespace layers {
 
 CompositorParent::CompositorParent(nsIWidget* aWidget)
   : mStopped(false), mWidget(aWidget)
 {
   MOZ_COUNT_CTOR(CompositorParent);
 }
--- a/gfx/layers/opengl/LayerManagerOGL.cpp
+++ b/gfx/layers/opengl/LayerManagerOGL.cpp
@@ -61,17 +61,19 @@
 
 #include "nsIServiceManager.h"
 #include "nsIConsoleService.h"
 
 #include "gfxCrashReporterUtils.h"
 
 #include "sampler.h"
 
+#ifdef MOZ_WIDGET_ANDROID
 #include <android/log.h>
+#endif
 
 namespace mozilla {
 namespace layers {
 
 using namespace mozilla::gl;
 
 #ifdef CHECK_CURRENT_PROGRAM
 int LayerManagerOGLProgram::sCurrentProgramKey = 0;
@@ -575,18 +577,21 @@ LayerManagerOGL::FPSState::DrawFPS(GLCon
     TimeDuration duration = now - last;
     last = now;
     fps = rate / duration.ToSeconds() + .5;
     fcount = 0;
   }
 
   GLint viewport[4];
   context->fGetIntegerv(LOCAL_GL_VIEWPORT, viewport);
+
+#ifdef MOZ_WIDGET_ANDROID
   __android_log_print(ANDROID_LOG_ERROR, "Gecko", "### Viewport: %d %d %d %d",
                       viewport[0], viewport[1], viewport[2], viewport[3]);
+#endif
 
   static GLuint texture;
   if (!initialized) {
     // Bind the number of textures we need, in this case one.
     context->fGenTextures(1, &texture);
     context->fBindTexture(LOCAL_GL_TEXTURE_2D, texture);
     context->fTexParameteri(LOCAL_GL_TEXTURE_2D,LOCAL_GL_TEXTURE_MIN_FILTER,LOCAL_GL_NEAREST);
     context->fTexParameteri(LOCAL_GL_TEXTURE_2D,LOCAL_GL_TEXTURE_MAG_FILTER,LOCAL_GL_NEAREST);