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

Unified Diff: Source/core/html/canvas/WebGLRenderingContext.cpp

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/html/canvas/WebGLRenderingContext.cpp
diff --git a/Source/core/html/canvas/WebGLRenderingContext.cpp b/Source/core/html/canvas/WebGLRenderingContext.cpp
index 63c900aafe4a869b96bedfdf373cda3248e372f3..ae12477421e949bf0e5ab46fdc7450012a0203c7 100644
--- a/Source/core/html/canvas/WebGLRenderingContext.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContext.cpp
@@ -75,6 +75,7 @@
#include "core/rendering/RenderBox.h"
#include "platform/NotImplemented.h"
#include "platform/geometry/IntSize.h"
+#include "platform/graphics/UnacceleratedImageBufferSurface.h"
#include "wtf/PassOwnPtr.h"
#include "wtf/Uint32Array.h"
@@ -5458,9 +5459,10 @@ ImageBuffer* WebGLRenderingContext::LRUImageBufferCache::imageBuffer(const IntSi
return buf;
}
- OwnPtr<ImageBuffer> temp = ImageBuffer::create(size, 1);
- if (!temp)
+ OwnPtr<ImageBufferSurface> surface = adoptPtr(new UnacceleratedImageBufferSurface(size));
+ if (!surface->isValid())
Stephen White 2013/12/04 21:18:40 Do we need a null ptr check here?
return 0;
+ OwnPtr<ImageBuffer> temp = adoptPtr(new ImageBuffer(surface.release()));
i = std::min(m_capacity - 1, i);
m_buffers[i] = temp.release();

Powered by Google App Engine
This is Rietveld 408576698