Skip to content

Commit

Permalink
Bug 1627482 - Fix non-unified build errors in gfx/gl. r=tnikkel
Browse files Browse the repository at this point in the history
  • Loading branch information
theres-waldo committed Apr 5, 2020
1 parent c3bfd46 commit 2a22ee2
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 7 deletions.
1 change: 1 addition & 0 deletions gfx/gl/GLContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "mozilla/StaticPrefs_gl.h"
#include "mozilla/IntegerPrintfMacros.h"
#include "mozilla/gfx/Logging.h"
#include "mozilla/layers/TextureForwarder.h" // for LayersIPCChannel

#include "OGLShaderProgram.h" // for ShaderProgramType

Expand Down
1 change: 1 addition & 0 deletions gfx/gl/GLContextProviderEGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#include "LayersLogging.h"
#include "mozilla/ArrayUtils.h"
#include "mozilla/Preferences.h"
#include "mozilla/Services.h"
#include "mozilla/gfx/gfxVars.h"
#include "mozilla/layers/CompositorOptions.h"
#include "mozilla/widget/CompositorWidget.h"
Expand Down
13 changes: 8 additions & 5 deletions gfx/gl/GLLibraryEGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include "gfxConfig.h"
#include "gfxCrashReporterUtils.h"
#include "gfxEnv.h"
#include "gfxUtils.h"
#include "mozilla/Preferences.h"
#include "mozilla/Assertions.h"
Expand All @@ -31,6 +32,7 @@
#include "prsystem.h"
#include "GLContext.h"
#include "GLContextProvider.h"
#include "GLReadTexImageHelper.h"
#include "ScopedGLHelpers.h"
#ifdef MOZ_WIDGET_GTK
# include <gdk/gdk.h>
Expand Down Expand Up @@ -286,7 +288,8 @@ static EGLDisplay GetAndInitDisplayForAccelANGLE(
return GetAndInitDisplayForWebRender(egl, EGL_DEFAULT_DISPLAY);
}

FeatureState& d3d11ANGLE = gfxConfig::GetFeature(Feature::D3D11_HW_ANGLE);
gfx::FeatureState& d3d11ANGLE =
gfx::gfxConfig::GetFeature(gfx::Feature::D3D11_HW_ANGLE);

if (!StaticPrefs::webgl_angle_try_d3d11()) {
d3d11ANGLE.UserDisable("User disabled D3D11 ANGLE by pref",
Expand All @@ -305,7 +308,7 @@ static EGLDisplay GetAndInitDisplayForAccelANGLE(
// will live longer than the ANGLE display so we're fine.
});

if (gfxConfig::IsForcedOnByUser(Feature::D3D11_HW_ANGLE)) {
if (gfx::gfxConfig::IsForcedOnByUser(gfx::Feature::D3D11_HW_ANGLE)) {
return GetAndInitDisplay(egl, LOCAL_EGL_D3D11_ONLY_DISPLAY_ANGLE);
}

Expand Down Expand Up @@ -346,8 +349,8 @@ bool GLLibraryEGL::ReadbackEGLImage(EGLImage image,
LOCAL_GL_NEAREST);
mReadbackGL->fEGLImageTargetTexture2D(target, image);

ShaderConfigOGL config =
ShaderConfigFromTargetAndFormat(target, out_surface->GetFormat());
layers::ShaderConfigOGL config =
layers::ShaderConfigFromTargetAndFormat(target, out_surface->GetFormat());
int shaderConfig = config.mFeatures;
mReadbackGL->ReadTexImageHelper()->ReadTexImage(
out_surface, 0, target, out_surface->GetSize(), shaderConfig);
Expand Down Expand Up @@ -811,7 +814,7 @@ EGLDisplay GLLibraryEGL::CreateDisplay(bool forceAccel,
// Some drivers doesn't support EGL_DEFAULT_DISPLAY
GdkDisplay* gdkDisplay = gdk_display_get_default();
if (gdkDisplay && !GDK_IS_X11_DISPLAY(gdkDisplay)) {
nativeDisplay = WaylandDisplayGetWLDisplay(gdkDisplay);
nativeDisplay = widget::WaylandDisplayGetWLDisplay(gdkDisplay);
if (!nativeDisplay) {
NS_WARNING("Failed to get wl_display.");
return nullptr;
Expand Down
4 changes: 4 additions & 0 deletions gfx/gl/GLLibraryEGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

#include "GLLibraryLoader.h"
#include "mozilla/StaticMutex.h"
#include "mozilla/StaticPtr.h"
#include "mozilla/ThreadLocal.h"
#include "GeckoProfiler.h"

Expand All @@ -25,6 +26,9 @@

class nsIGfxInfo;

template <typename T>
class nsCOMPtr;

namespace angle {
class Platform;
}
Expand Down
1 change: 1 addition & 0 deletions gfx/gl/GLLibraryLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

#include <regex>

#include "mozilla/gfx/Logging.h"
#include "nsDebug.h"

#ifdef WIN32
Expand Down
1 change: 1 addition & 0 deletions gfx/gl/GLLibraryLoader.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

#include "GLDefs.h"
#include "nscore.h"
#include "mozilla/Assertions.h"
#include "mozilla/SharedLibrary.h"

namespace mozilla {
Expand Down
3 changes: 2 additions & 1 deletion gfx/gl/TextureImageEGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "TextureImageEGL.h"
#include "GLLibraryEGL.h"
#include "GLContext.h"
#include "GLContextEGL.h"
#include "GLUploadHelpers.h"
#include "gfxPlatform.h"
#include "mozilla/gfx/Types.h"
Expand Down Expand Up @@ -103,7 +104,7 @@ bool TextureImageEGL::DirectUpdate(
size_t uploadSize = 0;
mTextureFormat = UploadSurfaceToTexture(mGLContext, aSurf, region, mTexture,
mSize, &uploadSize, needInit, aFrom);
if (mTextureFormat == SurfaceFormat::UNKNOWN) {
if (mTextureFormat == gfx::SurfaceFormat::UNKNOWN) {
return false;
}

Expand Down
4 changes: 3 additions & 1 deletion gfx/gl/TextureImageEGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#include "GLTextureImage.h"

#include "mozilla/gfx/Types.h"

namespace mozilla {
namespace gl {

Expand All @@ -18,7 +20,7 @@ class TextureImageEGL final : public TextureImage {
ContentType aContentType, GLContext* aContext,
Flags aFlags = TextureImage::NoFlags,
TextureState aTextureState = Created,
TextureImage::ImageFormat aImageFormat = SurfaceFormat::UNKNOWN);
TextureImage::ImageFormat aImageFormat = gfx::SurfaceFormat::UNKNOWN);

virtual ~TextureImageEGL();

Expand Down

0 comments on commit 2a22ee2

Please sign in to comment.