| Index: Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| diff --git a/Source/core/rendering/LayoutRectRecorder.h b/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| similarity index 74%
|
| copy from Source/core/rendering/LayoutRectRecorder.h
|
| copy to Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| index c92eb5efc90d50bfbac57653cda3a1c84df4b4b2..40812df5e776038dbafc423a578370ea08678312 100644
|
| --- a/Source/core/rendering/LayoutRectRecorder.h
|
| +++ b/Source/platform/graphics/UnacceleratedImageBufferSurface.cpp
|
| @@ -28,31 +28,24 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef LayoutRectRecorder_h
|
| -#define LayoutRectRecorder_h
|
| +#include "config.h"
|
| +#include "platform/graphics/UnacceleratedImageBufferSurface.h"
|
|
|
| -#include "platform/geometry/LayoutRect.h"
|
| -#include "wtf/Noncopyable.h"
|
| +#include "third_party/skia/include/core/SkCanvas.h"
|
| +#include "wtf/PassOwnPtr.h"
|
|
|
| namespace WebCore {
|
|
|
| -class RenderLayerModelObject;
|
| -class RenderObject;
|
| -
|
| -class LayoutRectRecorder {
|
| - WTF_MAKE_NONCOPYABLE(LayoutRectRecorder);
|
| -public:
|
| - LayoutRectRecorder(RenderObject&, bool skipRecording = false);
|
| - ~LayoutRectRecorder();
|
| -
|
| - static bool shouldRecordLayoutRects();
|
| -
|
| -private:
|
| - RenderObject& m_object;
|
| - bool m_skipRecording;
|
| -};
|
| +UnacceleratedImageBufferSurface::UnacceleratedImageBufferSurface(const IntSize& size, OpacityMode opacityMode)
|
| + : ImageBufferSurface(size, opacityMode)
|
| +{
|
| + SkBitmap bitmap;
|
| + bitmap.setConfig(SkBitmap::kARGB_8888_Config, size.width(), size.height());
|
| + bitmap.allocPixels();
|
| + if (bitmap.isNull())
|
| + return;
|
| + m_canvas = adoptPtr(new SkCanvas(bitmap));
|
| + clear();
|
| +}
|
|
|
| } // namespace WebCore
|
| -
|
| -#endif // LayoutRectRecorder_h
|
| -
|
|
|