summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-11-02 14:16:54 +0200
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-11-02 15:14:37 +0200
commit13ec2cc562ce98a089b47dee2987b5e58a0384e2 (patch)
treec6bd87d529a39d48a727de09c0e1ececad8285f2 /src
parentf13a8b0afa18f83321355563894549b4b014bcc2 (diff)
downloadqtlocation-mapboxgl-13ec2cc562ce98a089b47dee2987b5e58a0384e2.tar.gz
Revert "[core] Expose ColorMask in gl::Context::clear()"
This reverts commit e350ef37fe68312c4b5fb03b289a90c0bdda4f03.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/gl/context.cpp13
-rw-r--r--src/mbgl/gl/context.hpp3
-rw-r--r--src/mbgl/renderer/renderer_impl.cpp4
3 files changed, 6 insertions, 14 deletions
diff --git a/src/mbgl/gl/context.cpp b/src/mbgl/gl/context.cpp
index e04f134f39..a4f9cead0e 100644
--- a/src/mbgl/gl/context.cpp
+++ b/src/mbgl/gl/context.cpp
@@ -590,33 +590,28 @@ void Context::setDirtyState() {
void Context::clear(optional<mbgl::Color> color,
optional<float> depth,
- optional<int32_t> stencil,
- optional<ColorMode::Mask> colorMask_) {
+ optional<int32_t> stencil) {
GLbitfield mask = 0;
if (color) {
mask |= GL_COLOR_BUFFER_BIT;
clearColor = *color;
- colorMask = colorMask_ ? *colorMask_ : value::ColorMask::Default;
+ colorMask = value::ColorMask::Default;
}
if (depth) {
mask |= GL_DEPTH_BUFFER_BIT;
clearDepth = *depth;
- depthMask = true;
+ depthMask = value::DepthMask::Default;
}
if (stencil) {
mask |= GL_STENCIL_BUFFER_BIT;
clearStencil = *stencil;
- stencilMask = 0xFF;
+ stencilMask = value::StencilMask::Default;
}
MBGL_CHECK_ERROR(glClear(mask));
-
- if (colorMask_) {
- colorMask = value::ColorMask::Default;
- }
}
#if not MBGL_USE_GLES2
diff --git a/src/mbgl/gl/context.hpp b/src/mbgl/gl/context.hpp
index 2d650e7ecb..528113cbba 100644
--- a/src/mbgl/gl/context.hpp
+++ b/src/mbgl/gl/context.hpp
@@ -146,8 +146,7 @@ public:
void clear(optional<mbgl::Color> color,
optional<float> depth,
- optional<int32_t> stencil,
- optional<ColorMode::Mask> colorMask = value::ColorMask::Default);
+ optional<int32_t> stencil);
void setDrawMode(const Points&);
void setDrawMode(const Lines&);
diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp
index d7886ebe88..9ff5a3b6dd 100644
--- a/src/mbgl/renderer/renderer_impl.cpp
+++ b/src/mbgl/renderer/renderer_impl.cpp
@@ -443,9 +443,7 @@ void Renderer::Impl::render(const UpdateParameters& updateParameters) {
if (parameters.debugOptions & MapDebugOptions::Overdraw) {
parameters.context.clear(Color::black(), ClearDepth::Default, ClearStencil::Default);
} else if (parameters.contextMode == GLContextMode::Shared) {
- // Preserve the shared context background colors, clearing only alpha.
- optional<gl::ColorMode::Mask> mask = { { false, false, false, true } };
- parameters.context.clear(backgroundColor, ClearDepth::Default, ClearStencil::Default, mask);
+ parameters.context.clear({}, ClearDepth::Default, ClearStencil::Default);
} else {
parameters.context.clear(backgroundColor, ClearDepth::Default, ClearStencil::Default);
}