Changeset 136167 in webkit
- Timestamp:
- Nov 29, 2012, 2:34:18 PM (14 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/chromium/LazyDecodingPixelRef.cpp (modified) (2 diffs)
-
platform/graphics/chromium/LazyDecodingPixelRef.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r136166 r136167 1 2012-11-29 Min Qin <qinmin@chromium.org> 2 3 Make LazyDecodingPixelRef inherit from skia::LazyPixelRef so that cc thread can access it 4 https://bugs.webkit.org/show_bug.cgi?id=103555 5 6 Reviewed by Stephen White. 7 8 Expose LazyDecodingPixelRef to the cc thread by inheriting from skia::LazyPixelRef. 9 No test added for now as impl side paiting is still WIP. 10 11 * platform/graphics/chromium/LazyDecodingPixelRef.cpp: 12 (WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef): 13 (WebCore::LazyDecodingPixelRef::PrepareToDecode): 14 (WebCore): 15 (WebCore::LazyDecodingPixelRef::Decode): 16 * platform/graphics/chromium/LazyDecodingPixelRef.h: 17 (LazyDecodingPixelRef): 18 1 19 2012-11-29 Julien Chaffraix <jchaffraix@webkit.org> 2 20 -
trunk/Source/WebCore/platform/graphics/chromium/LazyDecodingPixelRef.cpp
r135911 r136167 35 35 36 36 LazyDecodingPixelRef::LazyDecodingPixelRef(PassRefPtr<ImageFrameGenerator> frameGenerator, const SkISize& scaledSize, const SkIRect& scaledSubset) 37 : SkPixelRef(0) 38 , m_frameGenerator(frameGenerator) 37 : m_frameGenerator(frameGenerator) 39 38 , m_scaledSize(scaledSize) 40 39 , m_scaledSubset(scaledSubset) … … 91 90 } 92 91 92 bool LazyDecodingPixelRef::PrepareToDecode(const LazyPixelRef::PrepareParams& params) 93 { 94 MutexLocker lock(m_mutex); 95 // TODO: check if only a particular rect is available in image cache. 96 UNUSED_PARAM(params); 97 return ImageDecodingStore::instance()->lockCompleteCache(m_frameGenerator.get(), m_scaledSize); 98 } 99 100 void LazyDecodingPixelRef::Decode() 101 { 102 lockPixels(); 103 unlockPixels(); 104 } 105 106 93 107 } // namespace WebKit -
trunk/Source/WebCore/platform/graphics/chromium/LazyDecodingPixelRef.h
r135911 r136167 27 27 #define LazyDecodingPixelRef_h 28 28 29 #include "SkTypes.h"30 29 #include "SkFlattenableBuffers.h" 31 30 #include "SkPixelRef.h" 32 31 #include "SkRect.h" 33 32 #include "SkSize.h" 33 #include "SkTypes.h" 34 #include "skia/ext/lazy_pixel_ref.h" 34 35 35 36 #include <wtf/RefPtr.h> 36 37 #include <wtf/ThreadingPrimitives.h> 38 39 using skia::LazyPixelRef; 37 40 38 41 namespace WebCore { … … 41 44 class ScaledImageFragment; 42 45 43 class LazyDecodingPixelRef : public SkPixelRef {46 class LazyDecodingPixelRef : public LazyPixelRef { 44 47 public: 45 48 LazyDecodingPixelRef(PassRefPtr<ImageFrameGenerator>, const SkISize& scaledSize, const SkIRect& scaledSubset); … … 51 54 bool isScaled(const SkISize& fullSize) const; 52 55 bool isClipped() const; 56 57 virtual bool PrepareToDecode(const LazyPixelRef::PrepareParams&); 58 virtual void Decode(); 53 59 54 60 protected:
Note:
See TracChangeset
for help on using the changeset viewer.