Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tgfx to the lastest version. #2524

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
{
"url": "${PAG_GROUP}/tgfx.git",
"commit": "d1dfcdfd82c3847e25c9640088ca321e3625ced3",
"commit": "6bf0581bd6c2b9794a52abffa35e782ee82bfcd0",
"dir": "third_party/tgfx"
},
{
Expand Down
6 changes: 3 additions & 3 deletions include/pag/gpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ enum class Backend {
enum class ImageOrigin {
/**
* The default origin of the native coordinate system in the GPU backend. For example, the
* SurfaceOrigin::TopLeft is actually the bottom-left origin in the OpenGL coordinate system for
* textures. Textures newly created by the backend API for off-screen rendering usually have a
* SurfaceOrigin::TopLeft origin.
* ImageOrigin::TopLeft is actually the bottom-left origin in the OpenGL coordinate system for
* textures. Textures newly created by the backend API for off-screen rendering usually have an
* ImageOrigin::TopLeft origin.
*/
TopLeft,

Expand Down
2 changes: 1 addition & 1 deletion qt/src/PAGView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <QThread>
#include "pag/file.h"
#include "platform/qt/GPUDrawable.h"
#include "tgfx/utils/Clock.h"
#include "tgfx/core/Clock.h"

namespace pag {
class RenderThread : public QThread {
Expand Down
2 changes: 1 addition & 1 deletion src/base/ByteData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "pag/file.h"
#include "tgfx/utils/Stream.h"
#include "tgfx/core/Stream.h"

namespace pag {
std::unique_ptr<ByteData> ByteData::FromPath(const std::string& filePath) {
Expand Down
2 changes: 1 addition & 1 deletion src/c/ext/egl/pag_egl_globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "pag/c/ext/egl/pag_egl_globals.h"
#include <mutex>
#include "tgfx/opengl/egl/EGLGlobals.h"
#include "tgfx/gpu/opengl/egl/EGLGlobals.h"

static std::mutex eglGlobalsLocker = {};

Expand Down
2 changes: 1 addition & 1 deletion src/c/ext/pag_surface_ext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "c/pag_types_priv.h"
#include "pag/pag.h"
#include "rendering/drawables/DoubleBufferedDrawable.h"
#include "tgfx/opengl/GLDevice.h"
#include "tgfx/gpu/opengl/GLDevice.h"

pag_surface* pag_surface_make_offscreen_double_buffered(int width, int height, bool tryHardware,
void* sharedContext) {
Expand Down
2 changes: 1 addition & 1 deletion src/codec/mp4/MP4BoxHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "MP4Generator.h"
#include "base/utils/Log.h"
#include "codec/utils/EncodeStream.h"
#include "tgfx/utils/Clock.h"
#include "tgfx/core/Clock.h"

namespace pag {
static const int SEQUENCE_NUMBER = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/codec/mp4/MP4Generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "MP4Generator.h"
#include "tgfx/utils/Clock.h"
#include "tgfx/core/Clock.h"

#define PushInWriteFun(funName) \
writeFun.emplace_back([this](auto&& PH1, auto&& PH2) -> int { \
Expand Down
2 changes: 1 addition & 1 deletion src/codec/utils/DecodeStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <string>
#include "codec/utils/StreamContext.h"
#include "pag/types.h"
#include "tgfx/utils/DataView.h"
#include "tgfx/core/DataView.h"

namespace pag {

Expand Down
2 changes: 1 addition & 1 deletion src/codec/utils/EncodeStream.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "codec/utils/StreamContext.h"
#include "pag/file.h"
#include "tgfx/utils/DataView.h"
#include "tgfx/core/DataView.h"

namespace pag {

Expand Down
2 changes: 1 addition & 1 deletion src/platform/android/GPUDrawable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "GPUDrawable.h"
#include "base/utils/Log.h"
#include "tgfx/gpu/Surface.h"
#include "tgfx/core/Surface.h"

namespace pag {
std::shared_ptr<GPUDrawable> GPUDrawable::FromWindow(ANativeWindow* nativeWindow,
Expand Down
2 changes: 1 addition & 1 deletion src/platform/android/GPUDrawable.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <android/native_window.h>
#include <android/native_window_jni.h>
#include "rendering/drawables/Drawable.h"
#include "tgfx/opengl/egl/EGLWindow.h"
#include "tgfx/gpu/opengl/egl/EGLWindow.h"

namespace pag {

Expand Down
4 changes: 2 additions & 2 deletions src/platform/android/HardwareDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "HardwareDecoder.h"
#include "base/utils/Log.h"
#include "platform/android/JStringUtil.h"
#include "tgfx/utils/Buffer.h"
#include "tgfx/utils/Task.h"
#include "tgfx/core/Buffer.h"
#include "tgfx/core/Task.h"

namespace pag {
static Global<jclass> HardwareDecoderClass;
Expand Down
2 changes: 1 addition & 1 deletion src/platform/android/JNativeTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include <jni.h>
#include "JNIHelper.h"
#include "tgfx/utils/Task.h"
#include "tgfx/core/Task.h"

extern "C" PAG_API void Java_org_libpag_NativeTask_Run(JNIEnv* env, jclass, jobject runnable) {
static pag::Global<jclass> runnableClass = env->FindClass("java/lang/Runnable");
Expand Down
2 changes: 1 addition & 1 deletion src/platform/cocoa/private/NativeTextShaper.mm
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include "NativeTextShaper.h"
#include <CoreText/CoreText.h>
#include "tgfx/core/UTF.h"
#include "tgfx/platform/apple/CTTypeface.h"
#include "tgfx/utils/UTF.h"

namespace pag {
std::optional<PositionedGlyphs> NativeTextShaper::Shape(
Expand Down
2 changes: 1 addition & 1 deletion src/platform/cocoa/private/PAGFileImpl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#import "PAGFileImpl.h"

#include "pag/pag.h"
#include "tgfx/utils/Task.h"
#include "tgfx/core/Task.h"

#import "PAGDiskCacheImpl.h"
#import "PAGLayerImpl+Internal.h"
Expand Down
2 changes: 1 addition & 1 deletion src/platform/ios/private/GPUDrawable.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#pragma once

#include "rendering/drawables/Drawable.h"
#include "tgfx/opengl/eagl/EAGLWindow.h"
#include "tgfx/gpu/opengl/eagl/EAGLWindow.h"

namespace pag {

Expand Down
2 changes: 1 addition & 1 deletion src/platform/ios/private/PAGSurfaceImpl.mm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "pag/types.h"
#include "platform/cocoa/private/PixelBufferUtil.h"
#include "rendering/drawables/HardwareBufferDrawable.h"
#include "tgfx/opengl/eagl/EAGLDevice.h"
#include "tgfx/gpu/opengl/eagl/EAGLDevice.h"

@interface PAGSurfaceImpl ()

Expand Down
2 changes: 1 addition & 1 deletion src/platform/mac/private/GPUDrawable.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#pragma once

#include "rendering/drawables/Drawable.h"
#include "tgfx/opengl/cgl/CGLWindow.h"
#include "tgfx/gpu/opengl/cgl/CGLWindow.h"

namespace pag {
class GPUDrawable : public Drawable {
Expand Down
4 changes: 2 additions & 2 deletions src/platform/mac/private/GPUDrawable.mm
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
/////////////////////////////////////////////////////////////////////////////////////////////////

#include "GPUDrawable.h"
#include "tgfx/gpu/Surface.h"
#include "tgfx/opengl/cgl/CGLWindow.h"
#include "tgfx/core/Surface.h"
#include "tgfx/gpu/opengl/cgl/CGLWindow.h"

namespace pag {
std::shared_ptr<GPUDrawable> GPUDrawable::FromView(NSView* view) {
Expand Down
2 changes: 1 addition & 1 deletion src/platform/ohos/GPUDrawable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "GPUDrawable.h"
#include <native_window/external_window.h>
#include "base/utils/Log.h"
#include "tgfx/gpu/Surface.h"
#include "tgfx/core/Surface.h"

namespace pag {
std::shared_ptr<GPUDrawable> GPUDrawable::FromWindow(NativeWindow* nativeWindow,
Expand Down
2 changes: 1 addition & 1 deletion src/platform/ohos/GPUDrawable.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include <native_window/external_window.h>
#include "rendering/drawables/Drawable.h"
#include "tgfx/opengl/egl/EGLWindow.h"
#include "tgfx/gpu/opengl/egl/EGLWindow.h"

namespace pag {

Expand Down
2 changes: 1 addition & 1 deletion src/platform/ohos/JPAGImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include <js_native_api.h>
#include <rawfile/raw_file.h>
#include <rawfile/raw_file_manager.h>
#include <tgfx/platform/ohos/OHOSPixelMap.h>
#include "JsHelper.h"
#include "rendering/editing/StillImage.h"
#include "tgfx/platform/ohos/OHOSPixelMap.h"

namespace pag {

Expand Down
2 changes: 1 addition & 1 deletion src/platform/ohos/JsHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include "JsHelper.h"
#include <multimedia/image_framework/image/pixelmap_native.h>
#include <multimedia/image_framework/image_pixel_map_mdk.h>
#include <tgfx/core/ImageInfo.h>
#include "base/utils/Log.h"
#include "tgfx/core/ImageInfo.h"

namespace pag {

Expand Down
2 changes: 1 addition & 1 deletion src/platform/qt/GPUDrawable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "GPUDrawable.h"
#include <QQuickWindow>
#include "tgfx/opengl/qt/QGLWindow.h"
#include "tgfx/gpu/opengl/qt/QGLWindow.h"

namespace pag {
std::shared_ptr<GPUDrawable> GPUDrawable::MakeFrom(QQuickItem* quickItem,
Expand Down
4 changes: 2 additions & 2 deletions src/platform/web/GPUDrawable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

#include "GPUDrawable.h"
#include "base/utils/Log.h"
#include "tgfx/gpu/Surface.h"
#include "tgfx/opengl/GLDefines.h"
#include "tgfx/core/Surface.h"
#include "tgfx/gpu/opengl/GLDefines.h"

namespace pag {
std::shared_ptr<GPUDrawable> GPUDrawable::FromCanvasID(const std::string& canvasID) {
Expand Down
2 changes: 1 addition & 1 deletion src/platform/web/GPUDrawable.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#pragma once

#include "rendering/drawables/Drawable.h"
#include "tgfx/opengl/webgl/WebGLWindow.h"
#include "tgfx/gpu/opengl/webgl/WebGLWindow.h"

namespace pag {
class GPUDrawable : public Drawable {
Expand Down
2 changes: 1 addition & 1 deletion src/platform/web/HardwareDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "WebVideoSequenceDemuxer.h"
#include "base/utils/TimeUtil.h"
#include "rendering/sequences/VideoSequenceDemuxer.h"
#include "tgfx/opengl/GLFunctions.h"
#include "tgfx/gpu/opengl/GLFunctions.h"

using namespace emscripten;

Expand Down
2 changes: 1 addition & 1 deletion src/platform/web/NativeTextShaper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "NativeTextShaper.h"
#include "UnicodeEmojiTable.hh"
#include "rendering/FontManager.h"
#include "tgfx/utils/UTF.h"
#include "tgfx/core/UTF.h"

namespace pag {
template <typename T>
Expand Down
2 changes: 1 addition & 1 deletion src/platform/web/PAGWasmBindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "rendering/editing/StillImage.h"
#include "tgfx/core/ImageInfo.h"
#include "tgfx/core/PathTypes.h"
#include "tgfx/opengl/GLDefines.h"
#include "tgfx/gpu/opengl/GLDefines.h"

using namespace emscripten;

Expand Down
2 changes: 1 addition & 1 deletion src/platform/win/GPUDrawable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "GPUDrawable.h"
#include <windows.h>
#include "base/utils/Log.h"
#include "tgfx/opengl/egl/EGLWindow.h"
#include "tgfx/gpu/opengl/egl/EGLWindow.h"

namespace pag {
std::shared_ptr<GPUDrawable> GPUDrawable::FromWindow(void* nativeWindow, void* sharedContext) {
Expand Down
4 changes: 2 additions & 2 deletions src/rendering/PAGAnimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#include "base/utils/TimeUtil.h"
#include "platform/Platform.h"
#include "rendering/utils/DisplayLinkWrapper.h"
#include "tgfx/utils/Clock.h"
#include "tgfx/utils/Task.h"
#include "tgfx/core/Clock.h"
#include "tgfx/core/Task.h"

namespace pag {
static constexpr int AnimationTypeEnd = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/rendering/PAGAnimator.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#pragma once

#include "pag/pag.h"
#include "tgfx/utils/Task.h"
#include "tgfx/core/Task.h"

namespace pag {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/rendering/PAGPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include "rendering/utils/ApplyScaleMode.h"
#include "rendering/utils/LockGuard.h"
#include "rendering/utils/ScopedLock.h"
#include "tgfx/utils/Clock.h"
#include "tgfx/core/Clock.h"

namespace pag {
PAGPlayer::PAGPlayer() {
Expand Down
2 changes: 1 addition & 1 deletion src/rendering/PAGSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#include "rendering/utils/GLRestorer.h"
#include "rendering/utils/LockGuard.h"
#include "rendering/utils/shaper/TextShaper.h"
#include "tgfx/utils/Clock.h"
#include "tgfx/core/Clock.h"

namespace pag {

Expand Down
2 changes: 1 addition & 1 deletion src/rendering/PAGSurfaceFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "rendering/drawables/OffscreenDrawable.h"
#include "rendering/drawables/RenderTargetDrawable.h"
#include "rendering/drawables/TextureDrawable.h"
#include "tgfx/opengl/GLDevice.h"
#include "tgfx/gpu/opengl/GLDevice.h"

namespace pag {
std::shared_ptr<PAGSurface> PAGSurface::MakeFrom(std::shared_ptr<Drawable> drawable) {
Expand Down
2 changes: 1 addition & 1 deletion src/rendering/Performance.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

#include "base/utils/Log.h"
#include "pag/types.h"
#include "tgfx/utils/Clock.h"
#include "tgfx/core/Clock.h"

namespace pag {
class Performance {
Expand Down
6 changes: 3 additions & 3 deletions src/rendering/caches/DiskCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#include "pag/pag.h"
#include "platform/Platform.h"
#include "rendering/utils/Directory.h"
#include "tgfx/utils/Buffer.h"
#include "tgfx/utils/DataView.h"
#include "tgfx/utils/Stream.h"
#include "tgfx/core/Buffer.h"
#include "tgfx/core/DataView.h"
#include "tgfx/core/Stream.h"

namespace pag {
class FileInfo {
Expand Down
2 changes: 1 addition & 1 deletion src/rendering/caches/RenderCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#include "rendering/renderers/FilterRenderer.h"
#include "rendering/sequences/SequenceImageProxy.h"
#include "rendering/sequences/SequenceInfo.h"
#include "tgfx/utils/Clock.h"
#include "tgfx/core/Clock.h"

namespace pag {
// 300M设置的大一些用于兜底,通常在大于20M时就开始随时清理。
Expand Down
4 changes: 2 additions & 2 deletions src/rendering/caches/SequenceFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
#include "base/utils/Log.h"
#include "pag/file.h"
#include "rendering/utils/Directory.h"
#include "tgfx/utils/Buffer.h"
#include "tgfx/utils/DataView.h"
#include "tgfx/core/Buffer.h"
#include "tgfx/core/DataView.h"

namespace pag {
static constexpr uint8_t FILE_VERSION = 1;
Expand Down
2 changes: 1 addition & 1 deletion src/rendering/caches/SequenceFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#include "rendering/utils/BitmapBuffer.h"
#include "rendering/utils/LZ4Decoder.h"
#include "rendering/utils/LZ4Encoder.h"
#include "tgfx/core/Buffer.h"
#include "tgfx/core/ImageInfo.h"
#include "tgfx/utils/Buffer.h"

namespace pag {
class DiskCache;
Expand Down
Loading