Commit 33b85d5b authored by benjamin@webkit.org's avatar benjamin@webkit.org

Remove the BlackBerry port from trunk

https://bugs.webkit.org/show_bug.cgi?id=126715

Patch by Benjamin Poulain <bpoulain@apple.com> on 2014-01-10
Reviewed by Anders Carlsson.

.: 

* CMakeLists.txt:
* Source/cmake/OptionsCommon.cmake:

Source/JavaScriptCore: 

* assembler/ARMAssembler.h:
(JSC::ARMAssembler::cacheFlush):
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::replaceWithJump):
(JSC::ARMv7Assembler::maxJumpReplacementSize):
(JSC::ARMv7Assembler::cacheFlush):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::revertJumpReplacementToBranchPtrWithPatch):
* heap/MachineStackMarker.cpp:
(JSC::getPlatformThreadRegisters):
(JSC::otherThreadStackPointer):
(JSC::freePlatformThreadRegisters):
* jit/ExecutableAllocator.h:

Source/WebCore: 

* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::readPixels):
* platform/graphics/ImageBuffer.cpp:
* platform/graphics/ImageBufferData.h:
* platform/graphics/IntPoint.h:
* platform/graphics/IntRect.h:
* platform/graphics/IntSize.h:
* platform/graphics/MediaPlayer.cpp:
* platform/graphics/NativeImagePtr.h:
* platform/graphics/OpenGLESShims.h:
* platform/graphics/Path.cpp:
(WebCore::Path::addPathForRoundedRect):
* platform/graphics/Path.h:
* platform/graphics/PlatformLayer.h:
* platform/graphics/filters/CustomFilterValidatedProgram.cpp:
* platform/graphics/filters/CustomFilterValidatedProgram.h:
* platform/graphics/filters/FilterOperation.h:
* platform/graphics/gpu/DrawingBuffer.cpp:
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
* platform/graphics/opengl/Extensions3DOpenGLES.cpp:
(WebCore::Extensions3DOpenGLES::getGraphicsResetStatusARB):
* platform/graphics/opengl/Extensions3DOpenGLES.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
(WebCore::GraphicsContext3D::prepareTexture):
(WebCore::GraphicsContext3D::bindFramebuffer):
(WebCore::GraphicsContext3D::compileShader):
(WebCore::GraphicsContext3D::copyTexImage2D):
(WebCore::GraphicsContext3D::copyTexSubImage2D):
* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::readPixels):
(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
(WebCore::GraphicsContext3D::reshapeFBOs):
* platform/network/NetworkStateNotifier.h:
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
* platform/network/ResourceRequestBase.cpp:

Tools: 

* DumpRenderTree/DumpRenderTree.h:
* DumpRenderTree/PixelDumpSupport.cpp:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161699 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent b0b8446f
......@@ -100,9 +100,6 @@ if (UNIX)
endif ()
elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
set(WTF_OS_WINDOWS 1)
elseif (CMAKE_SYSTEM_NAME MATCHES "QNX")
set(WTF_OS_QNX 1)
set(WTF_OS_UNIX 1)
else ()
message(FATAL_ERROR "Unknown OS '${CMAKE_SYSTEM_NAME}'")
endif ()
......
2014-01-10 Benjamin Poulain <bpoulain@apple.com>
Remove the BlackBerry port from trunk
https://bugs.webkit.org/show_bug.cgi?id=126715
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* Source/cmake/OptionsCommon.cmake:
2014-01-10 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
[EFL][JSC] Enable udis86 disassembler on efl.
......
2014-01-10 Benjamin Poulain <bpoulain@apple.com>
Remove the BlackBerry port from trunk
https://bugs.webkit.org/show_bug.cgi?id=126715
Reviewed by Anders Carlsson.
* assembler/ARMAssembler.h:
(JSC::ARMAssembler::cacheFlush):
* assembler/ARMv7Assembler.h:
(JSC::ARMv7Assembler::replaceWithJump):
(JSC::ARMv7Assembler::maxJumpReplacementSize):
(JSC::ARMv7Assembler::cacheFlush):
* assembler/MacroAssemblerARMv7.h:
(JSC::MacroAssemblerARMv7::revertJumpReplacementToBranchPtrWithPatch):
* heap/MachineStackMarker.cpp:
(JSC::getPlatformThreadRegisters):
(JSC::otherThreadStackPointer):
(JSC::freePlatformThreadRegisters):
* jit/ExecutableAllocator.h:
2014-01-10 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Remove unimplemented or static ScriptDebugServer features
......
......@@ -1121,11 +1121,6 @@ namespace JSC {
linuxPageFlush(current, end);
#elif OS(WINCE)
CacheRangeFlush(code, size, CACHE_SYNC_ALL);
#elif OS(QNX) && ENABLE(ASSEMBLER_WX_EXCLUSIVE)
UNUSED_PARAM(code);
UNUSED_PARAM(size);
#elif OS(QNX)
msync(code, size, MS_INVALIDATE_ICACHE);
#else
#error "The cacheFlush support is missing on this platform."
#endif
......
......@@ -1347,7 +1347,7 @@ public:
m_formatter.twoWordOp5i6Imm4Reg4EncodedImm(OP_MOV_imm_T3, imm.m_value.imm4, rd, imm);
}
#if OS(LINUX) || OS(QNX)
#if OS(LINUX)
static void revertJumpTo_movT3movtcmpT2(void* instructionStart, RegisterID left, RegisterID right, uintptr_t imm)
{
uint16_t* address = static_cast<uint16_t*>(instructionStart);
......@@ -2268,7 +2268,7 @@ public:
ASSERT(!(bitwise_cast<uintptr_t>(instructionStart) & 1));
ASSERT(!(bitwise_cast<uintptr_t>(to) & 1));
#if OS(LINUX) || OS(QNX)
#if OS(LINUX)
if (canBeJumpT4(reinterpret_cast<uint16_t*>(instructionStart), to)) {
uint16_t* ptr = reinterpret_cast<uint16_t*>(instructionStart) + 2;
linkJumpT4(ptr, to);
......@@ -2287,7 +2287,7 @@ public:
static ptrdiff_t maxJumpReplacementSize()
{
#if OS(LINUX) || OS(QNX)
#if OS(LINUX)
return 10;
#else
return 4;
......@@ -2377,13 +2377,6 @@ public:
linuxPageFlush(current, end);
#elif OS(WINCE)
CacheRangeFlush(code, size, CACHE_SYNC_ALL);
#elif OS(QNX)
#if !ENABLE(ASSEMBLER_WX_EXCLUSIVE)
msync(code, size, MS_INVALIDATE_ICACHE);
#else
UNUSED_PARAM(code);
UNUSED_PARAM(size);
#endif
#else
#error "The cacheFlush support is missing on this platform."
#endif
......
......@@ -1784,7 +1784,7 @@ public:
static void revertJumpReplacementToBranchPtrWithPatch(CodeLocationLabel instructionStart, RegisterID rd, void* initialValue)
{
#if OS(LINUX) || OS(QNX)
#if OS(LINUX)
ARMv7Assembler::revertJumpTo_movT3movtcmpT2(instructionStart.dataLocation(), rd, dataTempRegister, reinterpret_cast<uintptr_t>(initialValue));
#else
UNUSED_PARAM(rd);
......
......@@ -58,13 +58,6 @@
#include <pthread_np.h>
#endif
#if OS(QNX)
#include <fcntl.h>
#include <sys/procfs.h>
#include <stdio.h>
#include <errno.h>
#endif
#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN)
#include <signal.h>
#endif
......@@ -311,8 +304,6 @@ typedef arm_thread_state64_t PlatformThreadRegisters;
#elif OS(WINDOWS)
typedef CONTEXT PlatformThreadRegisters;
#elif OS(QNX)
typedef struct _debug_thread_info PlatformThreadRegisters;
#elif USE(PTHREADS)
typedef pthread_attr_t PlatformThreadRegisters;
#else
......@@ -358,22 +349,6 @@ static size_t getPlatformThreadRegisters(const PlatformThread& platformThread, P
regs.ContextFlags = CONTEXT_INTEGER | CONTEXT_CONTROL;
GetThreadContext(platformThread, &regs);
return sizeof(CONTEXT);
#elif OS(QNX)
memset(&regs, 0, sizeof(regs));
regs.tid = platformThread;
// FIXME: If we find this hurts performance, we can consider caching the fd and keeping it open.
int fd = open("/proc/self/as", O_RDONLY);
if (fd == -1) {
LOG_ERROR("Unable to open /proc/self/as (errno: %d)", errno);
CRASH();
}
int rc = devctl(fd, DCMD_PROC_TIDSTATUS, &regs, sizeof(regs), 0);
if (rc != EOK) {
LOG_ERROR("devctl(DCMD_PROC_TIDSTATUS) failed (error: %d)", rc);
CRASH();
}
close(fd);
return sizeof(struct _debug_thread_info);
#elif USE(PTHREADS)
pthread_attr_init(&regs);
#if HAVE(PTHREAD_NP_H) || OS(NETBSD)
......@@ -438,9 +413,6 @@ static inline void* otherThreadStackPointer(const PlatformThreadRegisters& regs)
#error Unknown Architecture
#endif
#elif OS(QNX)
return reinterpret_cast<void*>((uintptr_t) regs.sp);
#elif USE(PTHREADS)
void* stackBase = 0;
size_t stackSize = 0;
......@@ -455,7 +427,7 @@ static inline void* otherThreadStackPointer(const PlatformThreadRegisters& regs)
static void freePlatformThreadRegisters(PlatformThreadRegisters& regs)
{
#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN) && !OS(QNX)
#if USE(PTHREADS) && !OS(WINDOWS) && !OS(DARWIN)
pthread_attr_destroy(&regs);
#else
UNUSED_PARAM(regs);
......
......@@ -40,7 +40,7 @@
#include <libkern/OSCacheControl.h>
#endif
#if OS(IOS) || OS(QNX)
#if OS(IOS)
#include <sys/mman.h>
#endif
......
2014-01-10 Benjamin Poulain <bpoulain@apple.com>
Remove the BlackBerry port from trunk
https://bugs.webkit.org/show_bug.cgi?id=126715
Reviewed by Anders Carlsson.
* html/canvas/WebGLRenderingContext.cpp:
(WebCore::WebGLRenderingContext::readPixels):
* platform/graphics/ImageBuffer.cpp:
* platform/graphics/ImageBufferData.h:
* platform/graphics/IntPoint.h:
* platform/graphics/IntRect.h:
* platform/graphics/IntSize.h:
* platform/graphics/MediaPlayer.cpp:
* platform/graphics/NativeImagePtr.h:
* platform/graphics/OpenGLESShims.h:
* platform/graphics/Path.cpp:
(WebCore::Path::addPathForRoundedRect):
* platform/graphics/Path.h:
* platform/graphics/PlatformLayer.h:
* platform/graphics/filters/CustomFilterValidatedProgram.cpp:
* platform/graphics/filters/CustomFilterValidatedProgram.h:
* platform/graphics/filters/FilterOperation.h:
* platform/graphics/gpu/DrawingBuffer.cpp:
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
* platform/graphics/opengl/Extensions3DOpenGLES.cpp:
(WebCore::Extensions3DOpenGLES::getGraphicsResetStatusARB):
* platform/graphics/opengl/Extensions3DOpenGLES.h:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::paintRenderingResultsToCanvas):
(WebCore::GraphicsContext3D::prepareTexture):
(WebCore::GraphicsContext3D::bindFramebuffer):
(WebCore::GraphicsContext3D::compileShader):
(WebCore::GraphicsContext3D::copyTexImage2D):
(WebCore::GraphicsContext3D::copyTexSubImage2D):
* platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
(WebCore::GraphicsContext3D::readPixels):
(WebCore::GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary):
(WebCore::GraphicsContext3D::reshapeFBOs):
* platform/network/NetworkStateNotifier.h:
* platform/network/ResourceHandle.h:
* platform/network/ResourceHandleInternal.h:
* platform/network/ResourceRequestBase.cpp:
2014-01-10 Simon Fraser <simon.fraser@apple.com>
Fix CharsetData.cpp build for iOS
......@@ -3493,11 +3493,11 @@ void WebGLRenderingContext::readPixels(GC3Dint x, GC3Dint y, GC3Dsizei width, GC
m_context->readPixels(x, y, width, height, format, type, data);
}
#if OS(DARWIN) || OS(QNX)
#if OS(DARWIN)
if (m_isRobustnessEXTSupported) // we haven't computed padding
m_context->computeImageSizeInBytes(format, type, width, height, m_packAlignment, &totalBytesRequired, &padding);
// FIXME: remove this section when GL driver bug on Mac AND the GLES driver bug
// on QC & Imagination QNX is fixed, i.e., when alpha is off, readPixels should
// on QC is fixed, i.e., when alpha is off, readPixels should
// set alpha to 255 instead of 0.
if (!m_framebufferBinding && !m_context->getContextAttributes().alpha) {
unsigned char* pixels = reinterpret_cast<unsigned char*>(data);
......
......@@ -98,7 +98,7 @@ void ImageBuffer::convertToLuminanceMask()
genericConvertToLuminanceMask();
}
#if USE(ACCELERATED_COMPOSITING) && !USE(CAIRO) && !PLATFORM(BLACKBERRY)
#if USE(ACCELERATED_COMPOSITING) && !USE(CAIRO)
PlatformLayer* ImageBuffer::platformLayer() const
{
return 0;
......
......@@ -29,6 +29,4 @@
#include "ImageBufferDataCairo.h"
#elif USE(WINGDI)
#include "ImageBufferDataWince.h"
#elif PLATFORM(BLACKBERRY)
#include "ImageBufferDataBlackBerry.h"
#endif
......@@ -49,12 +49,6 @@ typedef struct tagPOINT POINT;
typedef struct tagPOINTS POINTS;
#elif PLATFORM(GTK)
typedef struct _GdkPoint GdkPoint;
#elif PLATFORM(BLACKBERRY)
namespace BlackBerry {
namespace Platform {
class IntPoint;
}
}
#elif PLATFORM(EFL)
typedef struct _Evas_Point Evas_Point;
#endif
......@@ -128,9 +122,6 @@ public:
#elif PLATFORM(GTK)
IntPoint(const GdkPoint&);
operator GdkPoint() const;
#elif PLATFORM(BLACKBERRY)
IntPoint(const BlackBerry::Platform::IntPoint&);
operator BlackBerry::Platform::IntPoint() const;
#elif PLATFORM(EFL)
explicit IntPoint(const Evas_Point&);
operator Evas_Point() const;
......
......@@ -55,12 +55,6 @@ typedef struct _GdkRectangle GdkRectangle;
#endif
#elif PLATFORM(EFL)
typedef struct _Eina_Rectangle Eina_Rectangle;
#elif PLATFORM(BLACKBERRY)
namespace BlackBerry {
namespace Platform {
class IntRect;
}
}
#endif
#if USE(CAIRO)
......@@ -204,11 +198,6 @@ public:
#endif
#endif // !PLATFORM(IOS)
#if PLATFORM(BLACKBERRY)
IntRect(const BlackBerry::Platform::IntRect&);
operator BlackBerry::Platform::IntRect() const;
#endif
void dump(PrintStream& out) const;
static IntRect infiniteRect();
......
......@@ -48,12 +48,6 @@ typedef struct _NSSize NSSize;
#if PLATFORM(WIN)
typedef struct tagSIZE SIZE;
#elif PLATFORM(BLACKBERRY)
namespace BlackBerry {
namespace Platform {
class IntSize;
}
}
#endif
namespace WebCore {
......@@ -148,11 +142,6 @@ public:
operator SIZE() const;
#endif
#if PLATFORM(BLACKBERRY)
IntSize(const BlackBerry::Platform::IntSize&);
operator BlackBerry::Platform::IntSize() const;
#endif
void dump(PrintStream& out) const;
private:
......
......@@ -72,10 +72,7 @@
#elif PLATFORM(WIN) && !USE(GSTREAMER)
#if USE(AVFOUNDATION)
#include "MediaPlayerPrivateAVFoundationCF.h"
#endif
#elif PLATFORM(BLACKBERRY)
#include "MediaPlayerPrivateBlackBerry.h"
#define PlatformMediaEngineClassName MediaPlayerPrivate
#endif // USE(AVFOUNDATION)
#endif
namespace WebCore {
......
......@@ -34,14 +34,6 @@ typedef struct CGImage* CGImageRef;
#include "RefPtrCairo.h"
#elif USE(WINGDI)
#include "SharedBitmap.h"
#elif PLATFORM(BLACKBERRY)
namespace BlackBerry {
namespace Platform {
namespace Graphics {
class TiledImage;
}
}
}
#endif
namespace WebCore {
......@@ -55,8 +47,6 @@ typedef RefPtr<cairo_surface_t> NativeImagePtr;
typedef PassRefPtr<cairo_surface_t> PassNativeImagePtr;
#elif USE(WINGDI)
typedef RefPtr<SharedBitmap> NativeImagePtr;
#elif PLATFORM(BLACKBERRY)
typedef BlackBerry::Platform::Graphics::TiledImage* NativeImagePtr;
#endif
#if !USE(CAIRO)
......
......@@ -26,7 +26,7 @@
#ifndef OpenGLESShims_h
#define OpenGLESShims_h
#if PLATFORM(BLACKBERRY) || PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN) || PLATFORM(NIX)
#if PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN) || PLATFORM(NIX)
#define glBindFramebufferEXT glBindFramebuffer
#define glFramebufferTexture2DEXT glFramebufferTexture2D
#define glBindRenderbufferEXT glBindRenderbuffer
......@@ -53,7 +53,7 @@
#define GL_READ_FRAMEBUFFER_EXT 0x8CA8
#define GL_DRAW_FRAMEBUFFER_EXT 0x8CA9
#define FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT 0x9134
#endif // PLATFORM(BLACKBERRY)
#endif
#endif // OpenGLESShims_h
......@@ -144,7 +144,7 @@ void Path::addRoundedRect(const FloatRect& rect, const FloatSize& topLeftRadius,
void Path::addPathForRoundedRect(const FloatRect& rect, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius, RoundedRectStrategy strategy)
{
if (strategy == PreferNativeRoundedRect) {
#if USE(CG) || PLATFORM(BLACKBERRY)
#if USE(CG)
platformAddPathForRoundedRect(rect, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
return;
#endif
......
......@@ -44,11 +44,6 @@ namespace WebCore {
class PlatformPath;
}
typedef WebCore::PlatformPath PlatformPath;
#elif PLATFORM(BLACKBERRY)
namespace BlackBerry { namespace Platform { namespace Graphics {
class Path;
} } }
typedef BlackBerry::Platform::Graphics::Path PlatformPath;
#else
typedef void PlatformPath;
#endif
......@@ -146,14 +141,10 @@ namespace WebCore {
void addPathForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius, RoundedRectStrategy = PreferNativeRoundedRect);
void addBeziersForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius);
#if USE(CG) || PLATFORM(BLACKBERRY)
#if USE(CG)
void platformAddPathForRoundedRect(const FloatRect&, const FloatSize& topLeftRadius, const FloatSize& topRightRadius, const FloatSize& bottomLeftRadius, const FloatSize& bottomRightRadius);
#endif
#if PLATFORM(BLACKBERRY)
Path(const PlatformPath&);
#endif
private:
PlatformPathPtr m_path;
};
......
......@@ -51,12 +51,7 @@ namespace WebCore {
class TextureMapperPlatformLayer;
typedef TextureMapperPlatformLayer PlatformLayer;
};
#endif
#elif PLATFORM(BLACKBERRY)
namespace WebCore {
class LayerWebKitThread;
typedef LayerWebKitThread PlatformLayer;
}
#endif // USE(TEXTURE_MAPPER)
#else
typedef void* PlatformLayer;
#endif
......
......@@ -604,7 +604,7 @@ CustomFilterProgramInfo CustomFilterValidatedProgram::validatedProgramInfo() con
return CustomFilterProgramInfo(m_validatedVertexShader, m_validatedFragmentShader, m_programInfo.programType(), m_programInfo.mixSettings(), m_programInfo.meshType());
}
#if !PLATFORM(BLACKBERRY) && !USE(TEXTURE_MAPPER)
#if !USE(TEXTURE_MAPPER)
void CustomFilterValidatedProgram::platformInit()
{
}
......
......@@ -38,14 +38,6 @@
#include <wtf/RefPtr.h>
#include <wtf/text/WTFString.h>
// PlatformCompiledProgram defines a type that is compatible with the framework used to implement accelerated compositing on a particular platform.
#if PLATFORM(BLACKBERRY)
namespace WebCore {
class LayerCompiledProgram;
}
typedef WebCore::LayerCompiledProgram PlatformCompiledProgram;
#endif
namespace WebCore {
struct ANGLEShaderSymbol;
......@@ -89,7 +81,7 @@ public:
return m_validatedFragmentShader;
}
#if PLATFORM(BLACKBERRY) || USE(TEXTURE_MAPPER)
#if USE(TEXTURE_MAPPER)
PlatformCompiledProgram* platformCompiledProgram();
#endif
......@@ -117,7 +109,7 @@ private:
String m_validatedFragmentShader;
RefPtr<CustomFilterCompiledProgram> m_compiledProgram;
#if PLATFORM(BLACKBERRY) || USE(TEXTURE_MAPPER)
#if USE(TEXTURE_MAPPER)
PlatformCompiledProgram* m_platformCompiledProgram;
#endif
......
......@@ -37,10 +37,6 @@
#include <wtf/RefCounted.h>
#include <wtf/text/WTFString.h>
#if PLATFORM(BLACKBERRY)
#include <wtf/ThreadSafeRefCounted.h>
#endif
// Annoyingly, wingdi.h #defines this.
#ifdef PASSTHROUGH
#undef PASSTHROUGH
......@@ -54,11 +50,7 @@ namespace WebCore {
class CachedSVGDocumentReference;
#endif
#if PLATFORM(BLACKBERRY)
class FilterOperation : public ThreadSafeRefCounted<FilterOperation> {
#else
class FilterOperation : public RefCounted<FilterOperation> {
#endif
public:
enum OperationType {
REFERENCE, // url(#somefilter)
......
......@@ -89,9 +89,7 @@ DrawingBuffer::~DrawingBuffer()
// Global resource ceiling (expressed in terms of pixels) for DrawingBuffer creation and resize.
// When this limit is set, DrawingBuffer::create() and DrawingBuffer::reset() calls that would
// exceed the global cap will instead clear the buffer.
#if !PLATFORM(BLACKBERRY)
static int s_maximumResourceUsePixels = 0;
#endif
static int s_currentResourceUsePixels = 0;
static const float s_resourceAdjustedRatio = 0.5;
......
......@@ -32,10 +32,6 @@
#include "ANGLEWebKitBridge.h"
#include "GraphicsContext3D.h"
#if PLATFORM(BLACKBERRY)
#include <BlackBerryPlatformLog.h>
#endif
#if PLATFORM(IOS)
#include <OpenGLES/ES2/glext.h>
#else
......
......@@ -33,10 +33,6 @@
#include <EGL/egl.h>
#include <wtf/Vector.h>
#if PLATFORM(BLACKBERRY)
#include <BlackBerryPlatformLog.h>
#endif
namespace WebCore {
Extensions3DOpenGLES::Extensions3DOpenGLES(GraphicsContext3D* context)
......@@ -176,11 +172,6 @@ int Extensions3DOpenGLES::getGraphicsResetStatusARB()
m_context->makeContextCurrent();
int reasonForReset = m_glGetGraphicsResetStatusEXT();
if (reasonForReset != GL_NO_ERROR) {
#if PLATFORM(BLACKBERRY)
// We cannot yet recreate our compositing thread, so just quit.
BlackBerry::Platform::logAlways(BlackBerry::Platform::LogLevelCritical, "Robust OpenGL context has been reset. Aborting.");
CRASH();
#endif
ASSERT(m_contextLostCallback);
if (m_contextLostCallback)
m_contextLostCallback->onContextLost();
......
......@@ -32,13 +32,6 @@
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
#if OS(QNX)
// See https://bugs.webkit.org/show_bug.cgi?id=91030.
// Newer Khorons headers do define these with a PROC suffix, but older headers don't.
#define PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMG PFNGLFRAMEBUFFERTEXTURE2DMULTISAMPLEIMGPROC
#define PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMG PFNGLRENDERBUFFERSTORAGEMULTISAMPLEIMGPROC
#endif
#ifndef GL_EXT_robustness
/* reuse GL_NO_ERROR */
#define GL_GUILTY_CONTEXT_RESET_EXT 0x8253
......
......@@ -72,10 +72,6 @@
#endif
#endif
#if PLATFORM(BLACKBERRY)
#include <BlackBerryPlatformLog.h>
#endif
namespace WebCore {
static ShaderNameHash* currentNameHashMapForShader;
......@@ -164,7 +160,7 @@ void GraphicsContext3D::paintRenderingResultsToCanvas(ImageBuffer* imageBuffer,
}
}
#if PLATFORM(BLACKBERRY) || USE(CG)
#if USE(CG)
paintToCanvas(pixels.get(), m_currentWidth, m_currentHeight,
imageBuffer->internalSize().width(), imageBuffer->internalSize().height(), imageBuffer->context());
#else
......@@ -203,7 +199,6 @@ PassRefPtr<ImageData> GraphicsContext3D::paintRenderingResultsToImageData(Drawin
return imageData.release();
}
#if !PLATFORM(BLACKBERRY)
void GraphicsContext3D::prepareTexture()
{
if (m_layerComposited)
......@@ -228,7 +223,6 @@ void GraphicsContext3D::prepareTexture()
::glFinish();
m_layerComposited = true;
}
#endif
void GraphicsContext3D::readRenderingResults(unsigned char *pixels, int pixelsSize)
{
......@@ -399,11 +393,7 @@ void GraphicsContext3D::bindFramebuffer(GC3Denum target, Platform3DObject buffer
if (buffer)
fbo = buffer;
else
#if PLATFORM(BLACKBERRY)
fbo = m_fbo;
#else
fbo = (m_attrs.antialias ? m_multisampleFBO : m_fbo);
#endif
if (fbo != m_state.boundFBO) {
::glBindFramebufferEXT(target, fbo);
m_state.boundFBO = fbo;
......@@ -562,9 +552,6 @@ void GraphicsContext3D::compileShader(Platform3DObject shader)
if (GLCompileSuccess != GL_TRUE) {
entry.isValid = false;
LOG(WebGL, "Error: shader translator produced a shader that OpenGL would not compile.");
#if PLATFORM(BLACKBERRY) && !defined(NDEBUG)
BBLOG(BlackBerry::Platform::LogLevelWarn, "The shader validated, but didn't compile.\n");
#endif
}
m_shaderSymbolCount = nullptr;
......@@ -573,33 +560,25 @@ void GraphicsContext3D::compileShader(Platform3DObject shader)
void GraphicsContext3D::copyTexImage2D(GC3Denum target, GC3Dint level, GC3Denum internalformat, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height, GC3Dint border)
{
makeContextCurrent();
#if !PLATFORM(BLACKBERRY)
if (m_attrs.antialias && m_state.boundFBO == m_multisampleFBO) {
resolveMultisamplingIfNecessary(IntRect(x, y, width, height));
::glBindFramebufferEXT(GraphicsContext3D::FRAMEBUFFER, m_fbo);
}
#endif
::glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
#if !PLATFORM(BLACKBERRY)
if (m_attrs.antialias && m_state.boundFBO == m_multisampleFBO)
::glBindFramebufferEXT(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO);
#endif
}
void GraphicsContext3D::copyTexSubImage2D(GC3Denum target, GC3Dint level, GC3Dint xoffset, GC3Dint yoffset, GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsizei height)
{
makeContextCurrent();
#if !PLATFORM(BLACKBERRY)
if (m_attrs.antialias && m_state.boundFBO == m_multisampleFBO) {
resolveMultisamplingIfNecessary(IntRect(x, y, width, height));
::glBindFramebufferEXT(GraphicsContext3D::FRAMEBUFFER, m_fbo);
}
#endif
::glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
#if !PLATFORM(BLACKBERRY)
if (m_attrs.antialias && m_state.boundFBO == m_multisampleFBO)
::glBindFramebufferEXT(GraphicsContext3D::FRAMEBUFFER, m_multisampleFBO);
#endif
}
void GraphicsContext3D::cullFace(GC3Denum mode)
......
......@@ -35,9 +35,6 @@
#include "Extensions3DOpenGLES.h"
#include "IntRect.h"
#include "IntSize.h"
#if PLATFORM(BLACKBERRY)
#include "LayerWebKitThread.h"
#endif
#include "NotImplemented.h"
namespace WebCore {
......@@ -54,15 +51,6 @@ void GraphicsContext3D::readPixels(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsi
// FIXME: remove the two glFlush calls when the driver bug is fixed, i.e.,
// all previous rendering calls should be done before reading pixels.
::glFlush();
#if PLATFORM(BLACKBERRY)
if (m_isImaginationHardware && m_fbo == m_state.boundFBO) {
// FIXME: This workaround should always be used until the
// driver alignment bug is fixed, even when we aren't
// drawing to the canvas.
readPixelsIMG(x, y, width, height, format, type, data);
} else
::glReadPixels(x, y, width, height, format, type, data);
#else
if (m_attrs.antialias && m_state.boundFBO == m_multisampleFBO) {
resolveMultisamplingIfNecessary(IntRect(x, y, width, height));
::glBindFramebuffer(GL_FRAMEBUFFER, m_fbo);
......@@ -73,22 +61,11 @@ void GraphicsContext3D::readPixels(GC3Dint x, GC3Dint y, GC3Dsizei width, GC3Dsi
if (m_attrs.antialias && m_state.boundFBO == m_multisampleFBO)
::glBindFramebuffer(GL_FRAMEBUFFER, m_multisampleFBO);
#endif
}
void GraphicsContext3D::readPixelsAndConvertToBGRAIfNecessary(int x, int y, int width, int height, unsigned char* pixels)
{
#if PLATFORM(BLACKBERRY)
if (m_isImaginationHardware && m_fbo == m_state.boundFBO) {
// FIXME: This workaround should always be used until the
// driver alignment bug is fixed, even when we aren't
// drawing to the canvas.
readPixelsIMG(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
} else
::glReadPixels(x, y, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
#else
::glReadPixels(x,