#include <dali/internal/graphics/gles/egl-sync-implementation.h>
#include <dali/public-api/common/dali-common.h>
+#include <dali/internal/graphics/gles/egl-graphics.h>
+
+#include <any>
+
// Uncomment the following define to turn on frame dumping
//#define ENABLE_COMMAND_BUFFER_FRAME_DUMP 1
#include <dali/internal/graphics/gles-impl/egl-graphics-controller-debug.h>
{
mCurrentContext = mContext.get();
mCurrentContext->GlContextCreated();
+
+ if(!mSharedContext)
+ {
+ auto eglGraphics = dynamic_cast<Dali::Internal::Adaptor::EglGraphics*>(mGraphics);
+ if(eglGraphics)
+ {
+ mSharedContext = eglGraphics->GetEglImplementation().GetContext();
+ }
+ }
}
void EglGraphicsController::ActivateSurfaceContext(Dali::RenderSurfaceInterface* surface)
mCurrentContext->PrepareForNativeRendering();
+ if(info->glesNativeInfo.eglSharedContextStoragePointer)
+ {
+ auto* anyContext = reinterpret_cast<std::any*>(info->glesNativeInfo.eglSharedContextStoragePointer);
+ *anyContext = mSharedContext;
+ }
+
CallbackBase::ExecuteReturn<bool>(*info->callback, info->userData);
mCurrentContext->RestoreFromNativeRendering();
}
mGlAbstraction->PixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ mGlAbstraction->PixelStorei(GL_UNPACK_ROW_LENGTH, info.srcStride);
+
mCurrentContext->BindTexture(bindTarget, texture->GetTextureTypeId(), texture->GetGLTexture());
if(!isSubImage)
}
// If upload buffer exceeds maximum size, flush.
- if(mTextureUploadTotalCPUMemoryUsed > TEXTURE_UPLOAD_MAX_BUFER_SIZE_MB * 1024)
+ if(mTextureUploadTotalCPUMemoryUsed > TEXTURE_UPLOAD_MAX_BUFER_SIZE_MB * 1024 * 1024)
{
Flush();
mTextureUploadTotalCPUMemoryUsed = 0;