| Index: Source/platform/graphics/gpu/WebGLImageBufferSurface.cpp
|
| diff --git a/Source/core/rendering/LayoutRectRecorder.h b/Source/platform/graphics/gpu/WebGLImageBufferSurface.cpp
|
| similarity index 69%
|
| copy from Source/core/rendering/LayoutRectRecorder.h
|
| copy to Source/platform/graphics/gpu/WebGLImageBufferSurface.cpp
|
| index c92eb5efc90d50bfbac57653cda3a1c84df4b4b2..a9869c98d2e519c54eebfe52fa8bdba12741a23d 100644
|
| --- a/Source/core/rendering/LayoutRectRecorder.h
|
| +++ b/Source/platform/graphics/gpu/WebGLImageBufferSurface.cpp
|
| @@ -28,31 +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 "platform/graphics/gpu/WebGLImageBufferSurface.h"
|
|
|
| -namespace WebCore {
|
| -
|
| -class RenderLayerModelObject;
|
| -class RenderObject;
|
| -
|
| -class LayoutRectRecorder {
|
| - WTF_MAKE_NONCOPYABLE(LayoutRectRecorder);
|
| -public:
|
| - LayoutRectRecorder(RenderObject&, bool skipRecording = false);
|
| - ~LayoutRectRecorder();
|
| +#include "platform/graphics/gpu/SharedGraphicsContext3D.h"
|
| +#include "platform/graphics/skia/GaneshUtils.h"
|
|
|
| - static bool shouldRecordLayoutRects();
|
| +namespace WebCore {
|
|
|
| -private:
|
| - RenderObject& m_object;
|
| - bool m_skipRecording;
|
| -};
|
| +WebGLImageBufferSurface::WebGLImageBufferSurface(const IntSize& size, OpacityMode opacityMode)
|
| + : ImageBufferSurface(size, opacityMode)
|
| +{
|
| + GrContext* gr = SharedGraphicsContext3D::get()->grContext();
|
| + if (!gr)
|
| + return;
|
| + ensureTextureBackedSkBitmap(gr, m_bitmap, size, kDefault_GrSurfaceOrigin, kRGBA_8888_GrPixelConfig);
|
| +}
|
| +
|
| +Platform3DObject WebGLImageBufferSurface::getBackingTexture() const
|
| +{
|
| + GrTexture* texture = m_bitmap.getTexture();
|
| + if (!texture)
|
| + return 0;
|
| + return texture->getTextureHandle();
|
| +}
|
|
|
| } // namespace WebCore
|
| -
|
| -#endif // LayoutRectRecorder_h
|
| -
|
|
|