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

Unified Diff: Source/platform/graphics/gpu/WebGLImageBufferSurface.cpp

Issue 104023007: Refactoring ImageBuffer to decouple it from Canvas2DLayerBridge (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase mayhem 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/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
-
« no previous file with comments | « Source/platform/graphics/gpu/WebGLImageBufferSurface.h ('k') | Source/platform/graphics/win/TransparencyWin.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698