| Index: Source/core/platform/graphics/gpu/NonDrawableAcceleratedImageBufferSurface.cpp
|
| diff --git a/Source/core/rendering/LayoutRectRecorder.h b/Source/core/platform/graphics/gpu/NonDrawableAcceleratedImageBufferSurface.cpp
|
| similarity index 65%
|
| copy from Source/core/rendering/LayoutRectRecorder.h
|
| copy to Source/core/platform/graphics/gpu/NonDrawableAcceleratedImageBufferSurface.cpp
|
| index 9fd331e2aca95cb262bbbd4e738d3b78286caa2d..f274b5b6eec19ac4fb6ebea697789158edbb030a 100644
|
| --- a/Source/core/rendering/LayoutRectRecorder.h
|
| +++ b/Source/core/platform/graphics/gpu/NonDrawableAcceleratedImageBufferSurface.cpp
|
| @@ -28,32 +28,30 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef LayoutRectRecorder_h
|
| -#define LayoutRectRecorder_h
|
| +#include "config.h"
|
|
|
| -#include "platform/geometry/LayoutRect.h"
|
| -#include "wtf/Noncopyable.h"
|
| +#include "core/platform/graphics/gpu/NonDrawableAcceleratedImageBufferSurface.h"
|
|
|
| -namespace WebCore {
|
| -
|
| -class RenderLayerModelObject;
|
| -class RenderObject;
|
| -
|
| -class LayoutRectRecorder {
|
| - WTF_MAKE_NONCOPYABLE(LayoutRectRecorder);
|
| -public:
|
| - LayoutRectRecorder(RenderObject&, bool skipRecording = false);
|
| - ~LayoutRectRecorder();
|
| +#include "core/platform/graphics/GaneshUtils.h"
|
| +#include "core/platform/graphics/gpu/SharedGraphicsContext3D.h"
|
|
|
| - static bool shouldRecordLayoutRects();
|
| +namespace WebCore {
|
|
|
| -private:
|
| - RenderObject& m_object;
|
| - RenderLayerModelObject* m_repaintContainer;
|
| - unsigned m_skipRecording : 1;
|
| -};
|
| +NonDrawableAcceleratedImageBufferSurface::NonDrawableAcceleratedImageBufferSurface(const IntSize& size, OpacityMode opacityMode, float resolutionScale)
|
| + : ImageBufferSurface(size, opacityMode, resolutionScale)
|
| +{
|
| + GrContext* gr = SharedGraphicsContext3D::get()->grContext();
|
| + if (!gr)
|
| + return;
|
| + ensureTextureBackedSkBitmap(gr, m_bitmap, size, kDefault_GrSurfaceOrigin, kRGBA_8888_GrPixelConfig);
|
| +}
|
| +
|
| +Platform3DObject NonDrawableAcceleratedImageBufferSurface::getBackingTexture() const
|
| +{
|
| + GrTexture* texture = m_bitmap.getTexture();
|
| + if (!texture)
|
| + return 0;
|
| + return texture->getTextureHandle();
|
| +}
|
|
|
| } // namespace WebCore
|
| -
|
| -#endif // LayoutRectRecorder_h
|
| -
|
|
|