Files
loongoffice/external/skia/constexpr-template.patch.0
Stephan Bergmann 1cba80e922 external/skia: Another constexpr template point of instantiation issue
...with --with-latest-c++ after 9c9a711ac5d8f32ac318d0e4ecab7b3a26bc2150 "Update
skia to m111",

> In file included from workdir/UnpackedTarball/skia/src/core/SkBitmapDevice.cpp:8:
> In file included from workdir/UnpackedTarball/skia/src/core/SkBitmapDevice.h:11:
> In file included from workdir/UnpackedTarball/skia/include/core/SkBitmap.h:12:
> In file included from workdir/UnpackedTarball/skia/include/core/SkImageInfo.h:14:
> In file included from workdir/UnpackedTarball/skia/include/core/SkRect.h:19:
> In file included from /Users/stephan/llvm/inst/bin/../include/c++/v1/algorithm:1747:
> In file included from /Users/stephan/llvm/inst/bin/../include/c++/v1/__algorithm/inplace_merge.h:28:
> ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:63:19: error: invalid application of 'sizeof' to an incomplete type 'SkStrikePinner'
>     static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
>                   ^~~~~~~~~~~
> ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:297:7: note: in instantiation of member function 'std::default_delete<SkStrikePinner>::operator()' requested here
>       __ptr_.second()(__tmp);
>       ^
> ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:263:75: note: in instantiation of member function 'std::unique_ptr<SkStrikePinner>::reset' requested here
>   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { reset(); }
>                                                                           ^
> workdir/UnpackedTarball/skia/src/core/SkStrikeCache.h:46:47: note: in instantiation of member function 'std::unique_ptr<SkStrikePinner>::~unique_ptr' requested here
>             std::unique_ptr<SkStrikePinner> = nullptr) SK_EXCLUDES(fLock);
>                                               ^
> workdir/UnpackedTarball/skia/src/core/SkStrikeCache.h:20:7: note: forward declaration of 'SkStrikePinner'
> class SkStrikePinner;
>       ^

Change-Id: I367323706d047da18fd8d4230a47a78fbb32b677
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146349
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-01-30 21:03:43 +00:00

66 lines
2.1 KiB
Plaintext

--- include/sksl/DSLFunction.h
+++ include/sksl/DSLFunction.h
@@ -93,17 +93,20 @@
DSLExpression call(ExpressionArray args, Position pos = {});
private:
+ static void push_back(ExpressionArray& args, DSLExpression& expr);
+
void collectArgs(ExpressionArray& args) {}
template<class... RemainingArgs>
void collectArgs(ExpressionArray& args, DSLVar& var, RemainingArgs&&... remaining) {
- args.push_back(DSLExpression(var).release());
+ DSLExpression expr(var);
+ push_back(args, expr);
collectArgs(args, std::forward<RemainingArgs>(remaining)...);
}
template<class... RemainingArgs>
void collectArgs(ExpressionArray& args, DSLExpression expr, RemainingArgs&&... remaining) {
- args.push_back(expr.release());
+ push_back(args, expr);
collectArgs(args, std::forward<RemainingArgs>(remaining)...);
}
--- src/core/SkStrikeCache.h
+++ src/core/SkStrikeCache.h
@@ -13,11 +13,10 @@
#include "include/private/base/SkLoadUserConfig.h" // IWYU pragma: keep
#include "include/private/base/SkMutex.h"
#include "src/core/SkDescriptor.h"
+#include "src/core/SkStrike.h"
#include "src/core/SkStrikeSpec.h"
#include "src/text/StrikeForGPU.h"
-class SkStrike;
-class SkStrikePinner;
class SkTraceMemoryDump;
// SK_DEFAULT_FONT_CACHE_COUNT_LIMIT and SK_DEFAULT_FONT_CACHE_LIMIT can be set using -D on your
--- src/gpu/ganesh/effects/GrBlendFragmentProcessor.h
+++ src/gpu/ganesh/effects/GrBlendFragmentProcessor.h
@@ -10,8 +10,7 @@
#include "include/core/SkRefCnt.h"
#include <memory>
-
-class GrFragmentProcessor;
+#include "src/gpu/ganesh/GrFragmentProcessor.h"
namespace GrBlendFragmentProcessor {
--- src/sksl/dsl/DSLFunction.cpp
+++ src/sksl/dsl/DSLFunction.cpp
@@ -41,6 +41,10 @@
return context.fConfig->fIsBuiltinCode && SkSL::FindIntrinsicKind(name) != kNotIntrinsic;
}
+void DSLFunction::push_back(ExpressionArray& args, DSLExpression& expr) {
+ args.push_back(expr.release());
+}
+
void DSLFunction::init(DSLModifiers modifiers, const DSLType& returnType, std::string_view name,
SkSpan<DSLParameter*> params, Position pos) {
fPosition = pos;