Changeset 156512 in webkit
- Timestamp:
- Sep 26, 2013, 4:00:26 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r156510 r156512 1 2013-09-26 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r156510. 4 http://trac.webkit.org/changeset/156510 5 https://bugs.webkit.org/show_bug.cgi?id=121989 6 7 Landed in-progress code along with build fix. (Requested by 8 bfulgham on #webkit). 9 10 * bindings/js/JSEventListener.cpp: 11 (WebCore::JSEventListener::JSEventListener): 12 * bindings/js/JSEventListener.h: 13 (WebCore::JSEventListener::jsFunction): 14 * bridge/jsc/BridgeJSC.cpp: 15 (JSC::Bindings::Instance::createRuntimeObject): 16 * platform/graphics/filters/FEGaussianBlur.cpp: 17 (WebCore::FEGaussianBlur::platformApplyGeneric): 18 (WebCore::FEGaussianBlur::platformApply): 19 * platform/graphics/win/DIBPixelData.cpp: 20 (WebCore::DIBPixelData::writeToFile): 21 * platform/graphics/win/DIBPixelData.h: 22 1 23 2013-09-26 Brent Fulgham <bfulgham@apple.com> 2 24 -
trunk/Source/WebCore/bindings/js/JSEventListener.cpp
r156510 r156512 48 48 if (wrapper) { 49 49 JSC::Heap::writeBarrier(wrapper, function); 50 m_jsFunction = JSC::Weak<JSC::JSObject>(function);50 m_jsFunction = function; 51 51 } else 52 52 ASSERT(!function); -
trunk/Source/WebCore/bindings/js/JSEventListener.h
r156510 r156512 86 86 JSC::JSObject* function = initializeJSFunction(scriptExecutionContext); 87 87 JSC::Heap::writeBarrier(m_wrapper.get(), function); 88 m_jsFunction = JSC::Weak<JSC::JSObject>(function);88 m_jsFunction = function; 89 89 } 90 90 -
trunk/Source/WebCore/bridge/jsc/BridgeJSC.cpp
r156510 r156512 83 83 JSLockHolder lock(exec); 84 84 RuntimeObject* newObject = newRuntimeObject(exec); 85 m_runtimeObject = JSC::Weak<RuntimeObject>(newObject);85 m_runtimeObject = newObject; 86 86 m_rootObject->addRuntimeObject(exec->vm(), newObject); 87 87 return newObject; -
trunk/Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp
r156510 r156512 164 164 Uint8ClampedArray* dst = tmpPixelArray; 165 165 166 void* dataOrig = src->data();167 void* dataDone = dst->data();168 size_t pixelCount = paintSize.height() * paintSize.width() * 4;169 DIBPixelData original(paintSize, dataOrig, pixelCount, stride, 32);170 if (0)171 original.writeToFile(L"C:\\Public\\ImageTest\\original.bmp");172 173 166 for (int i = 0; i < 3; ++i) { 174 167 if (kernelSizeX) { … … 199 192 } 200 193 201 DIBPixelData blurred(paintSize, dataDone, pixelCount, stride, 32);202 if (0)203 blurred.writeToFile(L"C:\\Public\\ImageTest\\blurred.bmp");204 205 194 // The final result should be stored in srcPixelArray. 206 195 if (dst == srcPixelArray) { … … 223 212 int extraHeight = 3 * kernelSizeY * 0.5f; 224 213 int optimalThreadNumber = (paintSize.width() * paintSize.height()) / (s_minimalRectDimension + extraHeight * paintSize.width()); 225 226 size_t pixelCount = paintSize.width() * paintSize.height() * 4;227 void* dataOrig = srcPixelArray->data();228 void* tmpOrig = tmpPixelArray->data();229 DIBPixelData original(paintSize, dataOrig, pixelCount, scanline, 32);230 if (0)231 original.writeToFile(L"C:\\Public\\ImageTest\\original.bmp");232 214 233 215 if (optimalThreadNumber > 1) { … … 284 266 memcpy(srcPixelArray->data() + destinationOffset, params.srcPixelArray->data() + sourceOffset, size); 285 267 } 286 287 // Dump the bitmap to disk.288 DIBPixelData blurred(paintSize, dataOrig, pixelCount, scanline, 32);289 if (0)290 blurred.writeToFile(L"C:\\Public\\ImageTest\\blurred.bmp");291 292 268 return; 293 269 } -
trunk/Source/WebCore/platform/graphics/win/DIBPixelData.cpp
r156510 r156512 37 37 } 38 38 39 DIBPixelData::DIBPixelData(IntSize size, void* data, size_t bufferLen, int bytesPerRow, int bytesPerPixel)40 {41 m_bitmapBuffer = reinterpret_cast<UInt8*>(data);42 m_bitmapBufferLength = bufferLen;43 m_size = size;44 m_bytesPerRow = bytesPerRow;45 m_bitsPerPixel = bytesPerPixel;46 }47 48 39 void DIBPixelData::initialize(HBITMAP bitmap) 49 40 { … … 62 53 { 63 54 HANDLE hFile = ::CreateFile(filePath, GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); 64 if (INVALID_HANDLE_VALUE == hFile) { 65 DWORD error = ::GetLastError(); 66 67 static const DWORD kFlags = FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS; 68 static const size_t bufSize = 4096; 69 70 wchar_t errorMessage[bufSize]; 71 DWORD len = ::FormatMessageW(kFlags, 0, error, 0, errorMessage, bufSize, 0); 72 if (len >= bufSize) 73 len = bufSize - 1; 74 75 errorMessage[len + 1] = 0; 55 if (INVALID_HANDLE_VALUE == hFile) 76 56 return; 77 }78 57 79 58 BITMAPFILEHEADER header; -
trunk/Source/WebCore/platform/graphics/win/DIBPixelData.h
r156510 r156512 49 49 } 50 50 DIBPixelData(HBITMAP); 51 DIBPixelData(IntSize size, void* data, size_t bufferLen, int bytesPerRow, int bytesPerPixel);52 51 53 52 void initialize(HBITMAP);
Note:
See TracChangeset
for help on using the changeset viewer.