Skip to content

Commit

Permalink
remove incomplete functions
Browse files Browse the repository at this point in the history
  • Loading branch information
wysaid committed Feb 13, 2023
1 parent 91b165e commit d3ab403
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 159 deletions.
1 change: 0 additions & 1 deletion library/src/main/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ LOCAL_SRC_FILES := \
$(CGE_SOURCE)/filters/cgeEdgeFilter.cpp \
$(CGE_SOURCE)/filters/cgeEmbossFilter.cpp \
\
$(CGE_SOURCE)/filters/cgeHistogramFilter.cpp \
$(CGE_SOURCE)/filters/cgeWaveformFilter.cpp \
\
$(CGE_SOURCE)/filters/cgeCrosshatchFilter.cpp \
Expand Down
5 changes: 0 additions & 5 deletions library/src/main/jni/cge/filters/cgeAdvancedEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,11 +137,6 @@ CGEBeautifyFilter* createBeautifyFilter()
COMMON_FUNC(CGEBeautifyFilter);
}

CGEHistogramFilter* createHistogramFilter()
{
COMMON_FUNC(CGEHistogramFilter);
}

CGEWaveformFilter* createWaveformFilter()
{
COMMON_FUNC(CGEWaveformFilter);
Expand Down
2 changes: 0 additions & 2 deletions library/src/main/jni/cge/filters/cgeAdvancedEffects.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "cgeEmbossFilter.h"
#include "cgeHalftoneFilter.h"
#include "cgeHazeFilter.h"
#include "cgeHistogramFilter.h"
#include "cgeLerpblurFilter.h"
#include "cgeLiquifyFilter.h"
#include "cgeMosaicBlurFilter.h"
Expand Down Expand Up @@ -51,7 +50,6 @@ CGESketchFilter* createSketchFilter();

CGEBeautifyFilter* createBeautifyFilter();

CGEHistogramFilter* createHistogramFilter();
CGEWaveformFilter* createWaveformFilter();
} // namespace CGE

Expand Down
20 changes: 0 additions & 20 deletions library/src/main/jni/cge/filters/cgeDataParsingEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1093,26 +1093,6 @@ CGEImageFilterInterface* CGEDataParsingEngine::advancedStyleParser(const char* p
{
ADJUSTHELP_COMMON_FUNC2(pstr, CGECrosshatchFilter, setCrosshatchSpacing, setLineWidth);
}
else if (strcmp(buffer, "hist") == 0)
{
float x, y, value1, value2, r, g, b;
if (sscanf(pstr, "%f%*c%f%*c%f%*c%f%*c%f%*c%f%*c%f", &x, &y, &value1, &value2, &r, &g, &b) != 7)
{
LOG_ERROR_PARAM(pstr);
return nullptr;
}

CGEHistogramFilter* filter = createHistogramFilter();
if (filter != nullptr)
{
proc = filter;
filter->setCenter(x, y);
filter->setXValue(value1);
filter->setYValue(value2);
filter->setColor(r, g, b);
}
}

else if (strcmp(buffer, "waveform") == 0)
{
float x, y, width, height;
Expand Down
66 changes: 0 additions & 66 deletions library/src/main/jni/cge/filters/cgeHistogramFilter.cpp

This file was deleted.

38 changes: 0 additions & 38 deletions library/src/main/jni/cge/filters/cgeHistogramFilter.h

This file was deleted.

27 changes: 0 additions & 27 deletions library/src/main/jni/cge/filters/cgeWaveformFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,6 @@

#define USING_ALPHA 1 /// 视图增加一个 80% 的半透明

// static CGEConstString s_vshWaveform = "#version 310 es\n" CGE_SHADER_STRING_PRECISION_H(
// layout(location = 0) in vec2 position;
// layout(location = 0) out vec2 textureCoordinate;
// void main() {
// gl_Position = vec4(position, 0.0, 1.0);
// textureCoordinate = (position.xy + 1.0) / 2.0;
// });

// static CGEConstString s_fshWaveform = "#version 310 es\n" CGE_SHADER_STRING(
// precision highp float;
// precision highp int;
// layout(location = 0) in vec2 textureCoordinate;
// layout(binding = 0) uniform sampler2D inputImageTexture;
// layout(rgba8ui, binding = 1) uniform writeonly highp uimage2D outputImage;
// layout(location = 0) out vec4 fragColor;

// void main() {
// fragColor = vec4(1.0);
// vec4 color = texture(inputImageTexture, textureCoordinate);
// float lum = dot(color.rgb, vec3(0.299, 0.587, 0.114));
// ivec2 newLoc = ivec2(vec2(textureCoordinate.x, lum) * vec2(imageSize(outputImage)));
// // uint newLum = uint(lum * 255.0);
// imageStore(outputImage, newLoc, uvec4(255, 255, 255, 255));

// // TODO: 直接使用 255 来描述最亮是没有问题的。 如果要实现颜色亮度叠加. 可以考虑使用 imageAtomicAdd.
// });

static CGEConstString s_cshWaveform = "#version 310 es\n" CGE_SHADER_STRING(
precision highp float;
precision highp int;
Expand Down

0 comments on commit d3ab403

Please sign in to comment.