⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 136167 in webkit


Ignore:
Timestamp:
Nov 29, 2012, 2:34:18 PM (14 years ago)
Author:
commit-queue@webkit.org
Message:

Make LazyDecodingPixelRef inherit from skia::LazyPixelRef so that cc thread can access it
​https://bugs.webkit.org/show_bug.cgi?id=103555

Patch by Min Qin <​qinmin@chromium.org> on 2012-11-29
Reviewed by Stephen White.

Expose LazyDecodingPixelRef to the cc thread by inheriting from skia::LazyPixelRef.
No test added for now as impl side paiting is still WIP.

  • platform/graphics/chromium/LazyDecodingPixelRef.cpp:

(WebCore::LazyDecodingPixelRef::LazyDecodingPixelRef):
(WebCore::LazyDecodingPixelRef::PrepareToDecode):
(WebCore):
(WebCore::LazyDecodingPixelRef::Decode):

  • platform/graphics/chromium/LazyDecodingPixelRef.h:

(LazyDecodingPixelRef):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r136166 r136167  
     12012-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
    1192012-11-29  Julien Chaffraix  <jchaffraix@webkit.org>
    220
  • trunk/Source/WebCore/platform/graphics/chromium/LazyDecodingPixelRef.cpp

    r135911 r136167  
    3535
    3636LazyDecodingPixelRef::LazyDecodingPixelRef(PassRefPtr<ImageFrameGenerator> frameGenerator, const SkISize& scaledSize, const SkIRect& scaledSubset)
    37     : SkPixelRef(0)
    38     , m_frameGenerator(frameGenerator)
     37    : m_frameGenerator(frameGenerator)
    3938    , m_scaledSize(scaledSize)
    4039    , m_scaledSubset(scaledSubset)
    … …  
    9190}
    9291
     92bool 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
     100void LazyDecodingPixelRef::Decode()
     101{
     102    lockPixels();
     103    unlockPixels();
     104}
     105
     106
    93107} // namespace WebKit
  • trunk/Source/WebCore/platform/graphics/chromium/LazyDecodingPixelRef.h

    r135911 r136167  
    2727#define LazyDecodingPixelRef_h
    2828
    29 #include "SkTypes.h"
    3029#include "SkFlattenableBuffers.h"
    3130#include "SkPixelRef.h"
    3231#include "SkRect.h"
    3332#include "SkSize.h"
     33#include "SkTypes.h"
     34#include "skia/ext/lazy_pixel_ref.h"
    3435
    3536#include <wtf/RefPtr.h>
    3637#include <wtf/ThreadingPrimitives.h>
     38
     39using skia::LazyPixelRef;
    3740
    3841namespace WebCore {
    … …  
    4144class ScaledImageFragment;
    4245
    43 class LazyDecodingPixelRef : public SkPixelRef {
     46class LazyDecodingPixelRef : public LazyPixelRef {
    4447public:
    4548    LazyDecodingPixelRef(PassRefPtr<ImageFrameGenerator>, const SkISize& scaledSize, const SkIRect& scaledSubset);
    … …  
    5154    bool isScaled(const SkISize& fullSize) const;
    5255    bool isClipped() const;
     56
     57    virtual bool PrepareToDecode(const LazyPixelRef::PrepareParams&);
     58    virtual void Decode();
    5359
    5460protected:
Note: See TracChangeset for help on using the changeset viewer.