Skip to content

Commit

Permalink
Fix link error on xcode 15 and move all Processor classes into proces…
Browse files Browse the repository at this point in the history
…sors/ directory. (#1757)
  • Loading branch information
domchen authored Oct 7, 2023
1 parent 6e383d0 commit 92dca94
Show file tree
Hide file tree
Showing 132 changed files with 122 additions and 139 deletions.
3 changes: 2 additions & 1 deletion libpag.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ Pod::Spec.new do |s|
'tgfx/src/vectors/*.{h,cpp}',
'tgfx/src/gpu/**/*.{h,cpp}',
'tgfx/src/opengl/*.{h,cpp,mm}',
'tgfx/src/opengl/processors/**/*.{h,cpp}',
'tgfx/src/platform/*.{h,cpp}',
'tgfx/src/codecs/webp/**/*.{h,cpp,mm}'

Expand Down Expand Up @@ -99,7 +100,7 @@ Pod::Spec.new do |s|

armv7CFlags = commonCFlags + ["-fno-aligned-allocation"]
s.xcconfig = {'CLANG_CXX_LANGUAGE_STANDARD' => 'c++17','CLANG_CXX_LIBRARY' => 'libc++',"HEADER_SEARCH_PATHS" => "#{PAG_ROOT}/src #{PAG_ROOT}/include #{PAG_ROOT}/tgfx/src #{PAG_ROOT}/tgfx/include #{PAG_ROOT}/third_party/pathkit #{PAG_ROOT}/third_party/skcms #{PAG_ROOT}/third_party/freetype/include #{PAG_ROOT}/third_party/libwebp/src #{PAG_ROOT}/third_party/libavc/common #{PAG_ROOT}/third_party/libavc/decoder"}
s.ios.xcconfig = {"OTHER_CFLAGS" => commonCFlags.join(" "),"OTHER_CFLAGS[sdk=iphoneos*][arch=armv7]" => armv7CFlags.join(" "),"EXPORTED_SYMBOLS_FILE" => "${PODS_ROOT}/../libpag.lds","OTHER_LDFLAGS" => "-w","VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS" => "OpenGLES"}
s.ios.xcconfig = {"OTHER_CFLAGS" => commonCFlags.join(" "),"OTHER_CFLAGS[sdk=iphoneos*][arch=armv7]" => armv7CFlags.join(" "),"EXPORTED_SYMBOLS_FILE" => "${PODS_ROOT}/../libpag.lds","OTHER_LDFLAGS" => "-w -ld64","VALIDATE_WORKSPACE_SKIPPED_SDK_FRAMEWORKS" => "OpenGLES"}
s.osx.xcconfig = {"OTHER_CFLAGS" => commonCFlags.join(" ")}
s.ios.vendored_frameworks = 'ios/Pods/pag-vendor/libpag-vendor.xcframework'
s.osx.vendored_frameworks = 'mac/Pods/pag-vendor/libpag-vendor.xcframework'
Expand Down
2 changes: 2 additions & 0 deletions tgfx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ endif ()
if (TGFX_USE_OPENGL)
file(GLOB GFX_PLATFORM_FILES src/opengl/*.*)
list(APPEND TGFX_FILES ${GFX_PLATFORM_FILES})
file(GLOB_RECURSE GFX_PROCESSOR_FILES src/opengl/processors/*.*)
list(APPEND TGFX_FILES ${GFX_PROCESSOR_FILES})
elseif (ANDROID)
file(GLOB_RECURSE GFX_PLATFORM_FILES src/vulkan/*.*)
list(APPEND TGFX_FILES ${GFX_PLATFORM_FILES})
Expand Down
8 changes: 4 additions & 4 deletions tgfx/src/core/Canvas.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
#include "tgfx/core/Canvas.h"
#include <atomic>
#include "CanvasState.h"
#include "gpu/AARectEffect.h"
#include "gpu/ConstColorProcessor.h"
#include "gpu/DeviceSpaceTextureEffect.h"
#include "gpu/GpuPaint.h"
#include "gpu/SurfaceDrawContext.h"
#include "gpu/TextureEffect.h"
#include "gpu/ops/ClearOp.h"
#include "gpu/ops/FillRectOp.h"
#include "gpu/ops/RRectOp.h"
#include "gpu/ops/TriangulatingPathOp.h"
#include "gpu/processors/AARectEffect.h"
#include "gpu/processors/ConstColorProcessor.h"
#include "gpu/processors/DeviceSpaceTextureEffect.h"
#include "gpu/processors/TextureEffect.h"
#include "tgfx/core/BlendMode.h"
#include "tgfx/core/Mask.h"
#include "tgfx/core/PathEffect.h"
Expand Down
4 changes: 2 additions & 2 deletions tgfx/src/core/Image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include "tgfx/core/Image.h"
#include "gpu/Texture.h"
#include "gpu/TextureEffect.h"
#include "gpu/TiledTextureEffect.h"
#include "gpu/processors/TextureEffect.h"
#include "gpu/processors/TiledTextureEffect.h"
#include "images/ImageSource.h"
#include "images/RGBAAAImage.h"
#include "images/RasterBuffer.h"
Expand Down
3 changes: 1 addition & 2 deletions tgfx/src/effects/BlurImageFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "BlurImageFilter.h"
#include "gpu/DualBlurFragmentProcessor.h"
#include "gpu/SurfaceDrawContext.h"
#include "gpu/TextureSampler.h"
#include "gpu/TiledTextureEffect.h"
#include "gpu/processors/DualBlurFragmentProcessor.h"

namespace tgfx {
static const float BLUR_LEVEL_1_LIMIT = 10.0f;
Expand Down
2 changes: 1 addition & 1 deletion tgfx/src/effects/ColorMatrixFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "ColorMatrixFilter.h"
#include "gpu/ColorMatrixFragmentProcessor.h"
#include "gpu/processors/ColorMatrixFragmentProcessor.h"
#include "utils/MathExtra.h"

namespace tgfx {
Expand Down
2 changes: 1 addition & 1 deletion tgfx/src/effects/LumaColorFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "LumaColorFilter.h"
#include "gpu/LumaColorFilterEffect.h"
#include "gpu/processors/LumaColorFilterEffect.h"

namespace tgfx {
std::shared_ptr<ColorFilter> ColorFilter::MakeLumaColorFilter() {
Expand Down
4 changes: 2 additions & 2 deletions tgfx/src/effects/ModeColorFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "ModeColorFilter.h"
#include "gpu/ConstColorProcessor.h"
#include "gpu/XfermodeFragmentProcessor.h"
#include "gpu/processors/ConstColorProcessor.h"
#include "gpu/processors/XfermodeFragmentProcessor.h"

namespace tgfx {
static bool IsNoOps(float alpha, BlendMode mode) {
Expand Down
2 changes: 1 addition & 1 deletion tgfx/src/effects/ShaderMaskFilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "ShaderMaskFilter.h"
#include "gpu/FragmentProcessor.h"
#include "gpu/processors/FragmentProcessor.h"

namespace tgfx {
std::shared_ptr<MaskFilter> MaskFilter::Make(std::shared_ptr<Shader> shader, bool inverted) {
Expand Down
2 changes: 1 addition & 1 deletion tgfx/src/gpu/GpuPaint.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include "gpu/FragmentProcessor.h"
#include "gpu/processors/FragmentProcessor.h"

namespace tgfx {
class GpuPaint {
Expand Down
2 changes: 1 addition & 1 deletion tgfx/src/gpu/OpsRenderPass.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

#include <optional>
#include "Blend.h"
#include "GeometryProcessor.h"
#include "GpuBuffer.h"
#include "Pipeline.h"
#include "Program.h"
#include "gpu/RenderTarget.h"
#include "gpu/processors/GeometryProcessor.h"
#include "tgfx/core/BlendMode.h"
#include "tgfx/core/Color.h"
#include "tgfx/gpu/Context.h"
Expand Down
2 changes: 1 addition & 1 deletion tgfx/src/gpu/Pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "Pipeline.h"
#include "gpu/PorterDuffXferProcessor.h"
#include "gpu/TextureSampler.h"
#include "gpu/processors/PorterDuffXferProcessor.h"

namespace tgfx {
Pipeline::Pipeline(std::unique_ptr<GeometryProcessor> geometryProcessor,
Expand Down
6 changes: 3 additions & 3 deletions tgfx/src/gpu/Pipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@

#pragma once

#include "EmptyXferProcessor.h"
#include "Swizzle.h"
#include "gpu/Blend.h"
#include "gpu/FragmentProcessor.h"
#include "gpu/GeometryProcessor.h"
#include "gpu/processors/EmptyXferProcessor.h"
#include "gpu/processors/FragmentProcessor.h"
#include "gpu/processors/GeometryProcessor.h"

namespace tgfx {
/**
Expand Down
2 changes: 1 addition & 1 deletion tgfx/src/gpu/ProgramBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "ProgramBuilder.h"
#include "FragmentProcessor.h"
#include "gpu/processors/FragmentProcessor.h"

namespace tgfx {
ProgramBuilder::ProgramBuilder(Context* context, const Pipeline* pipeline)
Expand Down
2 changes: 1 addition & 1 deletion tgfx/src/gpu/ProgramBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#pragma once

#include "FragmentShaderBuilder.h"
#include "GeometryProcessor.h"
#include "Pipeline.h"
#include "UniformHandler.h"
#include "VaryingHandler.h"
#include "VertexShaderBuilder.h"
#include "gpu/processors/GeometryProcessor.h"

namespace tgfx {
class ProgramBuilder {
Expand Down
4 changes: 2 additions & 2 deletions tgfx/src/gpu/ShaderBlend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "ShaderBlend.h"
#include "gpu/FragmentProcessor.h"
#include "gpu/XfermodeFragmentProcessor.h"
#include "gpu/processors/FragmentProcessor.h"
#include "gpu/processors/XfermodeFragmentProcessor.h"

namespace tgfx {
std::shared_ptr<Shader> Shader::MakeBlend(BlendMode mode, std::shared_ptr<Shader> dst,
Expand Down
2 changes: 1 addition & 1 deletion tgfx/src/gpu/SurfaceDrawContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#pragma once

#include "gpu/FragmentProcessor.h"
#include "gpu/ops/OpsTask.h"
#include "gpu/processors/FragmentProcessor.h"
#include "tgfx/core/Matrix.h"
#include "tgfx/core/Rect.h"
#include "tgfx/gpu/Surface.h"
Expand Down
2 changes: 1 addition & 1 deletion tgfx/src/gpu/ops/FillRectOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "FillRectOp.h"
#include "gpu/Gpu.h"
#include "gpu/Quad.h"
#include "gpu/QuadPerEdgeAAGeometryProcessor.h"
#include "gpu/ResourceProvider.h"
#include "gpu/processors/QuadPerEdgeAAGeometryProcessor.h"
#include "utils/UniqueID.h"

namespace tgfx {
Expand Down
2 changes: 1 addition & 1 deletion tgfx/src/gpu/ops/RRectOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "RRectOp.h"
#include "gpu/EllipseGeometryProcessor.h"
#include "gpu/Gpu.h"
#include "gpu/GpuBuffer.h"
#include "gpu/processors/EllipseGeometryProcessor.h"
#include "utils/MathExtra.h"

namespace tgfx {
Expand Down
2 changes: 1 addition & 1 deletion tgfx/src/gpu/ops/TriangulatingPathOp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include "TriangulatingPathOp.h"
#include "core/PathRef.h"
#include "gpu/DefaultGeometryProcessor.h"
#include "gpu/Gpu.h"
#include "gpu/processors/DefaultGeometryProcessor.h"

namespace tgfx {
std::unique_ptr<TriangulatingPathOp> TriangulatingPathOp::Make(Color color, const Path& path,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include "gpu/FragmentProcessor.h"
#include "gpu/processors/FragmentProcessor.h"

namespace tgfx {
class AARectEffect : public FragmentProcessor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#pragma once

#include <climits>
#include "gpu/FragmentProcessor.h"
#include "gpu/processors/FragmentProcessor.h"
#include "tgfx/core/Color.h"

namespace tgfx {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "gpu/ColorMatrixFragmentProcessor.h"
#include "gpu/processors/ColorMatrixFragmentProcessor.h"

namespace tgfx {
bool ColorMatrixFragmentProcessor::onIsEqual(const FragmentProcessor& processor) const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#pragma once

#include <array>
#include "gpu/FragmentProcessor.h"
#include "gpu/processors/FragmentProcessor.h"

namespace tgfx {
class ColorMatrixFragmentProcessor : public FragmentProcessor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "gpu/ConstColorProcessor.h"
#include "gpu/processors/ConstColorProcessor.h"

namespace tgfx {
void ConstColorProcessor::onComputeProcessorKey(BytesKey* bytesKey) const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include "gpu/FragmentProcessor.h"
#include "gpu/processors/FragmentProcessor.h"
#include "tgfx/core/Color.h"

namespace tgfx {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include "gpu/FragmentProcessor.h"
#include "gpu/processors/FragmentProcessor.h"

namespace tgfx {
class DeviceSpaceTextureEffect : public FragmentProcessor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
//
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "gpu/DualBlurFragmentProcessor.h"
#include "gpu/processors/DualBlurFragmentProcessor.h"

namespace tgfx {
DualBlurFragmentProcessor::DualBlurFragmentProcessor(DualBlurPassMode passMode,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include "gpu/FragmentProcessor.h"
#include "gpu/processors/FragmentProcessor.h"

namespace tgfx {
enum class DualBlurPassMode { Up = 0, Down = 1 };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include "gpu/FragmentProcessor.h"
#include "gpu/processors/FragmentProcessor.h"
#include "tgfx/core/Color.h"

namespace tgfx {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
//
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "gpu/FragmentProcessor.h"
#include "Pipeline.h"
#include "gpu/processors/FragmentProcessor.h"
#include "SeriesFragmentProcessor.h"
#include "gpu/XfermodeFragmentProcessor.h"
#include "gpu/Pipeline.h"
#include "gpu/processors/XfermodeFragmentProcessor.h"

namespace tgfx {
bool ComputeTotalInverse(const FPArgs& args, Matrix* totalInverse) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
#pragma once

#include <functional>
#include "CoordTransform.h"
#include "FragmentShaderBuilder.h"
#include "Processor.h"
#include "SamplerState.h"
#include "TextureProxy.h"
#include "UniformHandler.h"
#include "gpu/CoordTransform.h"
#include "gpu/FragmentShaderBuilder.h"
#include "gpu/SamplerState.h"
#include "gpu/Texture.h"
#include "gpu/TextureProxy.h"
#include "gpu/UniformBuffer.h"
#include "gpu/UniformHandler.h"
#include "gpu/processors/Processor.h"

namespace tgfx {
struct FPArgs {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
#pragma once

#include <vector>
#include "FragmentShaderBuilder.h"
#include "Processor.h"
#include "ShaderVar.h"
#include "VertexShaderBuilder.h"
#include "gpu/FragmentProcessor.h"
#include "gpu/FragmentShaderBuilder.h"
#include "gpu/ShaderVar.h"
#include "gpu/TextureSampler.h"
#include "gpu/UniformBuffer.h"
#include "gpu/UniformHandler.h"
#include "gpu/VaryingHandler.h"
#include "gpu/VertexShaderBuilder.h"
#include "gpu/processors/FragmentProcessor.h"
#include "gpu/processors/Processor.h"

namespace tgfx {
class GeometryProcessor : public Processor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include "gpu/FragmentProcessor.h"
#include "gpu/processors/FragmentProcessor.h"

namespace tgfx {
class LinearGradientLayout : public FragmentProcessor {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#pragma once

#include "gpu/FragmentProcessor.h"
#include "gpu/processors/FragmentProcessor.h"

namespace tgfx {
class LumaColorFilterEffect : public FragmentProcessor {
Expand Down
File renamed without changes.
Loading

0 comments on commit 92dca94

Please sign in to comment.