http://trac.webkit.org/changeset/156510
https://bugs.webkit.org/show_bug.cgi?id=121989
Landed in-progress code along with build fix. (Requested by
bfulgham on #webkit).
* bindings/js/JSEventListener.cpp:
(WebCore::JSEventListener::JSEventListener):
* bindings/js/JSEventListener.h:
(WebCore::JSEventListener::jsFunction):
* bridge/jsc/BridgeJSC.cpp:
(JSC::Bindings::Instance::createRuntimeObject):
* platform/graphics/filters/FEGaussianBlur.cpp:
(WebCore::FEGaussianBlur::platformApplyGeneric):
(WebCore::FEGaussianBlur::platformApply):
* platform/graphics/win/DIBPixelData.cpp:
(WebCore::DIBPixelData::writeToFile):
* platform/graphics/win/DIBPixelData.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156512
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2013-09-26 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r156510.
+ http://trac.webkit.org/changeset/156510
+ https://bugs.webkit.org/show_bug.cgi?id=121989
+
+ Landed in-progress code along with build fix. (Requested by
+ bfulgham on #webkit).
+
+ * bindings/js/JSEventListener.cpp:
+ (WebCore::JSEventListener::JSEventListener):
+ * bindings/js/JSEventListener.h:
+ (WebCore::JSEventListener::jsFunction):
+ * bridge/jsc/BridgeJSC.cpp:
+ (JSC::Bindings::Instance::createRuntimeObject):
+ * platform/graphics/filters/FEGaussianBlur.cpp:
+ (WebCore::FEGaussianBlur::platformApplyGeneric):
+ (WebCore::FEGaussianBlur::platformApply):
+ * platform/graphics/win/DIBPixelData.cpp:
+ (WebCore::DIBPixelData::writeToFile):
+ * platform/graphics/win/DIBPixelData.h:
+
2013-09-26 Brent Fulgham <bfulgham@apple.com>
[Windows] Unreviewed build fix after r156487.
{
if (wrapper) {
JSC::Heap::writeBarrier(wrapper, function);
- m_jsFunction = JSC::Weak<JSC::JSObject>(function);
+ m_jsFunction = function;
} else
ASSERT(!function);
#if ENABLE(INSPECTOR)
if (!m_jsFunction) {
JSC::JSObject* function = initializeJSFunction(scriptExecutionContext);
JSC::Heap::writeBarrier(m_wrapper.get(), function);
- m_jsFunction = JSC::Weak<JSC::JSObject>(function);
+ m_jsFunction = function;
}
// Verify that we have a valid wrapper protecting our function from
JSLockHolder lock(exec);
RuntimeObject* newObject = newRuntimeObject(exec);
- m_runtimeObject = JSC::Weak<RuntimeObject>(newObject);
+ m_runtimeObject = newObject;
m_rootObject->addRuntimeObject(exec->vm(), newObject);
return newObject;
}
Uint8ClampedArray* src = srcPixelArray;
Uint8ClampedArray* dst = tmpPixelArray;
- void* dataOrig = src->data();
- void* dataDone = dst->data();
- size_t pixelCount = paintSize.height() * paintSize.width() * 4;
- DIBPixelData original(paintSize, dataOrig, pixelCount, stride, 32);
- if (0)
- original.writeToFile(L"C:\\Public\\ImageTest\\original.bmp");
-
for (int i = 0; i < 3; ++i) {
if (kernelSizeX) {
kernelPosition(i, kernelSizeX, dxLeft, dxRight);
}
}
- DIBPixelData blurred(paintSize, dataDone, pixelCount, stride, 32);
- if (0)
- blurred.writeToFile(L"C:\\Public\\ImageTest\\blurred.bmp");
-
// The final result should be stored in srcPixelArray.
if (dst == srcPixelArray) {
ASSERT(src->length() == dst->length());
int extraHeight = 3 * kernelSizeY * 0.5f;
int optimalThreadNumber = (paintSize.width() * paintSize.height()) / (s_minimalRectDimension + extraHeight * paintSize.width());
- size_t pixelCount = paintSize.width() * paintSize.height() * 4;
- void* dataOrig = srcPixelArray->data();
- void* tmpOrig = tmpPixelArray->data();
- DIBPixelData original(paintSize, dataOrig, pixelCount, scanline, 32);
- if (0)
- original.writeToFile(L"C:\\Public\\ImageTest\\original.bmp");
-
if (optimalThreadNumber > 1) {
WTF::ParallelJobs<PlatformApplyParameters> parallelJobs(&platformApplyWorker, optimalThreadNumber);
memcpy(srcPixelArray->data() + destinationOffset, params.srcPixelArray->data() + sourceOffset, size);
}
-
- // Dump the bitmap to disk.
- DIBPixelData blurred(paintSize, dataOrig, pixelCount, scanline, 32);
- if (0)
- blurred.writeToFile(L"C:\\Public\\ImageTest\\blurred.bmp");
-
return;
}
// Fallback to single threaded mode.
initialize(bitmap);
}
-DIBPixelData::DIBPixelData(IntSize size, void* data, size_t bufferLen, int bytesPerRow, int bytesPerPixel)
-{
- m_bitmapBuffer = reinterpret_cast<UInt8*>(data);
- m_bitmapBufferLength = bufferLen;
- m_size = size;
- m_bytesPerRow = bytesPerRow;
- m_bitsPerPixel = bytesPerPixel;
-}
-
void DIBPixelData::initialize(HBITMAP bitmap)
{
BITMAP bmpInfo;
void DIBPixelData::writeToFile(LPCWSTR filePath)
{
HANDLE hFile = ::CreateFile(filePath, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
- if (INVALID_HANDLE_VALUE == hFile) {
- DWORD error = ::GetLastError();
-
- static const DWORD kFlags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS;
- static const size_t bufSize = 4096;
-
- wchar_t errorMessage[bufSize];
- DWORD len = ::FormatMessageW(kFlags, 0, error, 0, errorMessage, bufSize, 0);
- if (len >= bufSize)
- len = bufSize - 1;
-
- errorMessage[len + 1] = 0;
+ if (INVALID_HANDLE_VALUE == hFile)
return;
- }
BITMAPFILEHEADER header;
header.bfType = bitmapType;
{
}
DIBPixelData(HBITMAP);
- DIBPixelData(IntSize size, void* data, size_t bufferLen, int bytesPerRow, int bytesPerPixel);
void initialize(HBITMAP);