remove support for composite layers

This commit is contained in:
Ansis Brammanis
2014-08-13 16:16:08 -07:00
committed by Konstantin Käfer
parent 478a1dae67
commit 32a1711d8c
17 changed files with 53 additions and 373 deletions

View File

@@ -18,7 +18,6 @@
#include <mbgl/shader/raster_shader.hpp>
#include <mbgl/shader/text_shader.hpp>
#include <mbgl/shader/dot_shader.hpp>
#include <mbgl/shader/composite_shader.hpp>
#include <mbgl/shader/gaussian_shader.hpp>
#include <mbgl/map/transform_state.hpp>
@@ -46,7 +45,6 @@ class PrerenderedTexture;
struct FillProperties;
struct RasterProperties;
struct CompositeProperties;
class LayerDescription;
class RasterTileData;
@@ -111,13 +109,11 @@ public:
void drawClippingMasks(const std::set<std::shared_ptr<StyleSource>> &sources);
void drawClippingMask(const mat4& matrix, const ClipID& clip);
void clearFramebuffers();
void resetFramebuffer();
void bindFramebuffer();
void pushFramebuffer();
GLuint popFramebuffer();
void discardFramebuffers();
void drawComposite(GLuint texture, const CompositeProperties &properties);
bool needsAnimation() const;
private:
@@ -172,7 +168,6 @@ public:
std::unique_ptr<RasterShader> rasterShader;
std::unique_ptr<TextShader> textShader;
std::unique_ptr<DotShader> dotShader;
std::unique_ptr<CompositeShader> compositeShader;
std::unique_ptr<GaussianShader> gaussianShader;
// Set up the stencil quad we're using to generate the stencil mask.
@@ -193,7 +188,6 @@ public:
VertexArrayObject coveringRasterArray;
VertexArrayObject coveringGaussianArray;
VertexArrayObject compositeArray;
VertexArrayObject matteArray;
// Set up the tile boundary lines we're using to draw the tile outlines.

View File

@@ -1,29 +0,0 @@
#ifndef MBGL_SHADER_COMPOSITE_SHADER
#define MBGL_SHADER_COMPOSITE_SHADER
#include <mbgl/shader/shader.hpp>
namespace mbgl {
class CompositeShader : public Shader {
public:
CompositeShader();
void bind(char *offset);
void setImage(int32_t image);
void setOpacity(float opacity);
private:
int32_t a_pos = -1;
int32_t image = 0;
int32_t u_image = -1;
float opacity = 0;
int32_t u_opacity = -1;
};
}
#endif

View File

@@ -51,8 +51,6 @@ enum class PropertyKey {
TextTranslateY,
TextTranslateAnchor,
CompositeOpacity,
RasterOpacity,
RasterHueRotate,
RasterBrightness, // for transitions only

View File

@@ -76,16 +76,6 @@ struct SymbolProperties {
}
};
struct CompositeProperties {
inline CompositeProperties() {}
float opacity = 1.0f;
inline bool isVisible() const {
return opacity > 0;
}
};
struct RasterProperties {
inline RasterProperties() {}
float opacity = 1.0f;
@@ -109,7 +99,6 @@ typedef util::variant<
FillProperties,
LineProperties,
SymbolProperties,
CompositeProperties,
RasterProperties,
BackgroundProperties,
std::false_type

View File

@@ -19,7 +19,6 @@ enum class StyleLayerType : uint8_t {
Line,
Symbol,
Raster,
Composite,
Background
};
@@ -29,7 +28,6 @@ MBGL_DEFINE_ENUM_CLASS(StyleLayerTypeClass, StyleLayerType, {
{ StyleLayerType::Line, "line" },
{ StyleLayerType::Symbol, "symbol" },
{ StyleLayerType::Raster, "raster" },
{ StyleLayerType::Composite, "composite" },
{ StyleLayerType::Background, "background" },
{ StyleLayerType(-1), "unknown" },
});