/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
// INTERNAL HEADERS
#include "loader-jpeg.h"
-#include "resource-loading-client.h"
#include <dali/integration-api/bitmap.h>
-#include <resource-loader/debug/resource-loader-debug.h>
#include "platform-capabilities.h"
#include "image-operations.h"
return true;
}
-bool LoadBitmapFromJpeg( const ResourceLoadingClient& client, const ImageLoader::Input& input, Integration::Bitmap& bitmap )
+bool LoadBitmapFromJpeg( const ImageLoader::Input& input, Integration::Bitmap& bitmap )
{
const int flags= 0;
FILE* const fp = input.file;
DALI_LOG_ERROR("Error seeking to start of file\n");
}
- // Allow early cancellation between the load and the decompress:
- client.InterruptionPoint();
-
AutoJpg autoJpg(tjInitDecompress());
if(autoJpg.GetHandle() == NULL)
unsigned char * const bitmapPixelBuffer = bitmap.GetPackedPixelsProfile()->ReserveBuffer(Pixel::RGB888, scaledPostXformWidth, scaledPostXformHeight);
- // Allow early cancellation before decoding:
- client.InterruptionPoint();
-
if( tjDecompress2( autoJpg.GetHandle(), jpegBufferPtr, jpegBufferSize, bitmapPixelBuffer, scaledPreXformWidth, 0, scaledPreXformHeight, DECODED_PIXEL_LIBJPEG_TYPE, flags ) == -1 )
{
std::string errorString = tjGetErrorStr();
const unsigned int bufferWidth = GetTextureDimension( scaledPreXformWidth );
const unsigned int bufferHeight = GetTextureDimension( scaledPreXformHeight );
- if( transform != JPGFORM_NONE )
- {
- // Allow early cancellation before shuffling pixels around on the CPU:
- client.InterruptionPoint();
- }
-
bool result = false;
switch(transform)
{