diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebCore/ChangeLog | 50 | ||||
-rw-r--r-- | Source/WebCore/DerivedSources.pri | 2 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/ImageSource.cpp | 7 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/ImageSource.h | 2 | ||||
-rw-r--r-- | Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp | 7 | ||||
-rw-r--r-- | Source/WebCore/platform/image-decoders/ImageDecoder.cpp | 18 | ||||
-rw-r--r-- | Source/WebCore/platform/image-decoders/ImageDecoder.h | 5 | ||||
-rw-r--r-- | Source/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp | 8 |
8 files changed, 98 insertions, 1 deletions
diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog index 6c7a78268..94d68fa57 100644 --- a/Source/WebCore/ChangeLog +++ b/Source/WebCore/ChangeLog @@ -1,3 +1,53 @@ +2012-10-17 Simon Hausmann <simon.hausmann@digia.com> + + [Qt] Avoid re-creating CSSGrammar.cpp with each (incremental) build + + Reviewed by Tor Arne Vestbø. + + The expected output is CSSGrammar.cpp and the input file used to be CSSGrammar.y, + so ${QMAKE_FILE_BASE}.cpp did the correct transformation. Recently the input has + changed to CSSGrammar.y.in, in which case the ${QMAKE_FILE_BASE} is CSSGrammar.y + unfortunately. The resulting target CSSGrammar.y.cpp will never be created and + therefore the target will always run. + + * DerivedSources.pri: + +2012-10-17 Ilya Tikhonovsky <loislo@chromium.org> + + Unreviewed fix for ImageSourceCG. + + * platform/graphics/cg/ImageSourceCG.cpp: + (WebCore::ImageSource::reportMemoryUsage): + +2012-10-17 Ilya Tikhonovsky <loislo@chromium.org> + + Unreviewed fix for compilation on CG bots. + + * platform/graphics/cg/ImageSourceCG.cpp: + +2012-10-16 Ilya Tikhonovsky <loislo@chromium.org> + + Web Inspector: NMI instrument ImageDecoder. It owns a buffer that could be quite big. + https://bugs.webkit.org/show_bug.cgi?id=99540 + + Reviewed by Yury Semikhatsky. + + * platform/graphics/ImageSource.cpp: + (WebCore::ImageSource::reportMemoryUsage): + (WebCore): + * platform/graphics/ImageSource.h: + (ImageSource): + * platform/image-decoders/ImageDecoder.cpp: + (WebCore::ImageFrame::reportMemoryUsage): + (WebCore): + (WebCore::ImageDecoder::reportMemoryUsage): + * platform/image-decoders/ImageDecoder.h: + (ImageFrame): + (ImageDecoder): + * platform/image-decoders/skia/ImageDecoderSkia.cpp: + (WebCore::ImageFrame::reportMemoryUsage): + (WebCore): + 2012-10-17 Zeno Albisser <zeno@webkit.org> [Qt] Fix build on Mac OSX 10.6 and earlier. diff --git a/Source/WebCore/DerivedSources.pri b/Source/WebCore/DerivedSources.pri index 5dfbf9b32..f4235a45d 100644 --- a/Source/WebCore/DerivedSources.pri +++ b/Source/WebCore/DerivedSources.pri @@ -801,7 +801,7 @@ InjectedScriptCanvasModuleSource.add_output_to_sources = false GENERATORS += InjectedScriptCanvasModuleSource # GENERATOR 4: CSS grammar -cssbison.output = ${QMAKE_FILE_BASE}.cpp +cssbison.output = CSSGrammar.cpp cssbison.input = CSSBISON cssbison.script = $$PWD/css/makegrammar.pl cssbison.commands = perl -I $$PWD/bindings/scripts $$cssbison.script --outputDir ${QMAKE_FUNC_FILE_OUT_PATH} --extraDefines \"$${DEFINES} $$configDefines()\" --preprocessor \"$${QMAKE_MOC} -E\" --symbolsPrefix cssyy ${QMAKE_FILE_NAME} diff --git a/Source/WebCore/platform/graphics/ImageSource.cpp b/Source/WebCore/platform/graphics/ImageSource.cpp index 9816e6341..82dfde1c9 100644 --- a/Source/WebCore/platform/graphics/ImageSource.cpp +++ b/Source/WebCore/platform/graphics/ImageSource.cpp @@ -33,6 +33,7 @@ #include "ImageOrientation.h" #include "NotImplemented.h" +#include "PlatformMemoryInstrumentation.h" namespace WebCore { @@ -205,4 +206,10 @@ unsigned ImageSource::frameBytesAtIndex(size_t index) const return m_decoder->frameBytesAtIndex(index); } +void ImageSource::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const +{ + MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Image); + info.addMember(m_decoder); +} + } diff --git a/Source/WebCore/platform/graphics/ImageSource.h b/Source/WebCore/platform/graphics/ImageSource.h index 6879eda05..0d8a01e26 100644 --- a/Source/WebCore/platform/graphics/ImageSource.h +++ b/Source/WebCore/platform/graphics/ImageSource.h @@ -155,6 +155,8 @@ public: static void setMaxPixelsPerDecodedImage(unsigned maxPixels) { s_maxPixelsPerDecodedImage = maxPixels; } #endif + void reportMemoryUsage(MemoryObjectInfo*) const; + private: NativeImageSourcePtr m_decoder; diff --git a/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp b/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp index 063efc65c..c133364dd 100644 --- a/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp +++ b/Source/WebCore/platform/graphics/cg/ImageSourceCG.cpp @@ -33,6 +33,7 @@ #include "IntPoint.h" #include "IntSize.h" #include "MIMETypeRegistry.h" +#include "PlatformMemoryInstrumentation.h" #include "SharedBuffer.h" #include <ApplicationServices/ApplicationServices.h> #include <wtf/UnusedParam.h> @@ -396,6 +397,12 @@ unsigned ImageSource::frameBytesAtIndex(size_t index) const return frameSize.width() * frameSize.height() * 4; } +void ImageSource::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const +{ + MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Image); + // FIXME: addMember call required for m_decoder. +} + } #endif // USE(CG) diff --git a/Source/WebCore/platform/image-decoders/ImageDecoder.cpp b/Source/WebCore/platform/image-decoders/ImageDecoder.cpp index 1ee03efc6..4f652757f 100644 --- a/Source/WebCore/platform/image-decoders/ImageDecoder.cpp +++ b/Source/WebCore/platform/image-decoders/ImageDecoder.cpp @@ -30,6 +30,7 @@ #endif #include "JPEGImageDecoder.h" #include "PNGImageDecoder.h" +#include "PlatformMemoryInstrumentation.h" #include "SharedBuffer.h" #if USE(WEBP) #include "WEBPImageDecoder.h" @@ -37,6 +38,7 @@ #include <algorithm> #include <cmath> +#include <wtf/MemoryInstrumentationVector.h> using namespace std; @@ -234,6 +236,12 @@ int ImageFrame::height() const return m_size.height(); } +void ImageFrame::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const +{ + MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Image); + info.addMember(m_backingStore); +} + #endif namespace { @@ -337,4 +345,14 @@ int ImageDecoder::scaledY(int origY, int searchStart) return getScaledValue<Exact>(m_scaledRows, origY, searchStart); } +void ImageDecoder::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const +{ + MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Image); + info.addMember(m_data); + info.addMember(m_frameBufferCache); + info.addMember(m_colorProfile); + info.addMember(m_scaledColumns); + info.addMember(m_scaledRows); +} + } diff --git a/Source/WebCore/platform/image-decoders/ImageDecoder.h b/Source/WebCore/platform/image-decoders/ImageDecoder.h index d0cc53b14..fc82a5c25 100644 --- a/Source/WebCore/platform/image-decoders/ImageDecoder.h +++ b/Source/WebCore/platform/image-decoders/ImageDecoder.h @@ -145,6 +145,9 @@ namespace WebCore { return m_bytes + (y * width()) + x; #endif } + + void reportMemoryUsage(MemoryObjectInfo*) const; + private: int width() const; int height() const; @@ -359,6 +362,8 @@ namespace WebCore { void setMaxNumPixels(int m) { m_maxNumPixels = m; } #endif + virtual void reportMemoryUsage(MemoryObjectInfo*) const; + protected: void prepareScaleDataIfNecessary(); int upperBoundScaledX(int origX, int searchStart = 0); diff --git a/Source/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp b/Source/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp index 1fe7348ef..14c119fb4 100644 --- a/Source/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp +++ b/Source/WebCore/platform/image-decoders/skia/ImageDecoderSkia.cpp @@ -27,6 +27,8 @@ #include "config.h" #include "ImageDecoder.h" +#include "PlatformMemoryInstrumentation.h" + namespace WebCore { ImageFrame::ImageFrame() @@ -145,4 +147,10 @@ int ImageFrame::height() const return m_bitmap.bitmap().height(); } +void ImageFrame::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const +{ + MemoryClassInfo info(memoryObjectInfo, this, PlatformMemoryTypes::Image); + info.addMember(m_bitmap); +} + } // namespace WebCore |