Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1270)

Unified Diff: Source/core/platform/graphics/gpu/AcceleratedImageBufferSurface.h

Issue 104023007: Refactoring ImageBuffer to decouple it from Canvas2DLayerBridge (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: build fixes for win+mac Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/platform/graphics/gpu/AcceleratedImageBufferSurface.h
diff --git a/Source/core/rendering/LayoutRectRecorder.h b/Source/core/platform/graphics/gpu/AcceleratedImageBufferSurface.h
similarity index 67%
copy from Source/core/rendering/LayoutRectRecorder.h
copy to Source/core/platform/graphics/gpu/AcceleratedImageBufferSurface.h
index 9fd331e2aca95cb262bbbd4e738d3b78286caa2d..74c35e3c22409e4cda9ef9e26dd53d64766d1b95 100644
--- a/Source/core/rendering/LayoutRectRecorder.h
+++ b/Source/core/platform/graphics/gpu/AcceleratedImageBufferSurface.h
@@ -28,32 +28,30 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef LayoutRectRecorder_h
-#define LayoutRectRecorder_h
+#ifndef AcceleratedImageBufferSurface_h
+#define AcceleratedImageBufferSurface_h
-#include "platform/geometry/LayoutRect.h"
-#include "wtf/Noncopyable.h"
+#include "platform/graphics/ImageBufferSurface.h"
+#include "wtf/OwnPtr.h"
namespace WebCore {
-class RenderLayerModelObject;
-class RenderObject;
-
-class LayoutRectRecorder {
- WTF_MAKE_NONCOPYABLE(LayoutRectRecorder);
+class AcceleratedImageBufferSurface : public ImageBufferSurface {
+ WTF_MAKE_NONCOPYABLE(AcceleratedImageBufferSurface); WTF_MAKE_FAST_ALLOCATED;
public:
- LayoutRectRecorder(RenderObject&, bool skipRecording = false);
- ~LayoutRectRecorder();
+ AcceleratedImageBufferSurface(const IntSize&, OpacityMode = NonOpaque, float resolutionScale = 1.0f, int msaaSampleCount = 0);
Stephen White 2013/12/04 21:18:40 I'm 99.99% certain we don't support hiDPI canvas.
+ virtual ~AcceleratedImageBufferSurface() { }
- static bool shouldRecordLayoutRects();
+ virtual SkCanvas* canvas() const OVERRIDE { return m_canvas.get();}
+ virtual bool isValid() const OVERRIDE { return m_canvas; }
+ virtual bool isAccelerated() const OVERRIDE { return true; }
+ virtual Platform3DObject getBackingTexture() const OVERRIDE;
private:
- RenderObject& m_object;
- RenderLayerModelObject* m_repaintContainer;
- unsigned m_skipRecording : 1;
+ OwnPtr<SkCanvas> m_canvas;
};
-} // namespace WebCore
-#endif // LayoutRectRecorder_h
+} // namespace WebCore
+#endif

Powered by Google App Engine
This is Rietveld 408576698