| Index: Source/platform/fonts/shaping/CachingWordShaper.h
|
| diff --git a/Source/core/frame/LocalFrameLifecycleObserver.h b/Source/platform/fonts/shaping/CachingWordShaper.h
|
| similarity index 62%
|
| copy from Source/core/frame/LocalFrameLifecycleObserver.h
|
| copy to Source/platform/fonts/shaping/CachingWordShaper.h
|
| index b7109cee619ba5857846d64f60a72ec4af4b0f94..b0ea74d9cc2ca58abb3afcdd35df07a7bd18abaa 100644
|
| --- a/Source/core/frame/LocalFrameLifecycleObserver.h
|
| +++ b/Source/platform/fonts/shaping/CachingWordShaper.h
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright (C) 2011 Google, Inc. All Rights Reserved.
|
| + * Copyright (C) 2015 Google Inc. All rights reserved.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions
|
| @@ -23,36 +23,39 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef LocalFrameLifecycleObserver_h
|
| -#define LocalFrameLifecycleObserver_h
|
| +#ifndef CachingWordShaper_h
|
| +#define CachingWordShaper_h
|
|
|
| -#include "core/CoreExport.h"
|
| -#include "core/frame/LocalFrame.h"
|
| -#include "platform/LifecycleObserver.h"
|
| -#include "platform/heap/Handle.h"
|
| +
|
| +#include "platform/geometry/FloatRect.h"
|
| +#include "platform/text/TextRun.h"
|
| +#include "wtf/PassRefPtr.h"
|
|
|
| namespace blink {
|
|
|
| -class LocalFrame;
|
| -class LocalFrameLifecycleNotifier;
|
| +class Font;
|
| +class GlyphBuffer;
|
| +class SimpleFontData;
|
| +class ShapeCache;
|
| +struct GlyphData;
|
|
|
| -class CORE_EXPORT LocalFrameLifecycleObserver : public LifecycleObserver<LocalFrame, LocalFrameLifecycleObserver, LocalFrameLifecycleNotifier> {
|
| +class PLATFORM_EXPORT CachingWordShaper final {
|
| public:
|
| - virtual void willDetachFrameHost() { }
|
| - virtual void contextDestroyed()
|
| - {
|
| - setContext(nullptr);
|
| - }
|
| -
|
| - LocalFrame* frame() const { return lifecycleContext(); }
|
| -
|
| -protected:
|
| - explicit LocalFrameLifecycleObserver(LocalFrame* frame)
|
| - : LifecycleObserver(frame)
|
| - {
|
| - }
|
| + CachingWordShaper();
|
| + ~CachingWordShaper();
|
| + void clear();
|
| +
|
| + float width(const Font*, const TextRun&,
|
| + HashSet<const SimpleFontData*>* fallbackFonts,
|
| + FloatRect* glyphBounds);
|
| + float fillGlyphBuffer(const Font*, const TextRun&,
|
| + HashSet<const SimpleFontData*>*, GlyphBuffer*,
|
| + unsigned from, unsigned to);
|
| +
|
| + private:
|
| + ShapeCache* m_shapeCache;
|
| };
|
|
|
| } // namespace blink
|
|
|
| -#endif // LocalFrameLifecycleObserver_h
|
| +#endif // CachingWordShaper_h
|
|
|