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

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

Issue 127493002: Removed most calls to GraphicsContext3D from DrawingBuffer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 11 months 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 387b5581e7e15d28e7e8af818006a0b5655250b6..0d097a754733b69c9f540c9265510efdab0471bb 100644
--- a/Source/core/html/canvas/WebGLRenderingContext.cpp
+++ b/Source/core/html/canvas/WebGLRenderingContext.cpp
@@ -126,7 +126,7 @@ size_t WebGLRenderingContext::oldestContextIndex()
size_t candidateID = 0;
for (size_t ii = 1; ii < activeContexts().size(); ++ii) {
WebGLRenderingContext* context = activeContexts()[ii];
- if (context->graphicsContext3D() && candidate->graphicsContext3D() && context->graphicsContext3D()->lastFlushID() < candidate->graphicsContext3D()->lastFlushID()) {
+ if (context->webGraphicsContext3D() && candidate->webGraphicsContext3D() && context->webGraphicsContext3D()->lastFlushID() < candidate->webGraphicsContext3D()->lastFlushID()) {
candidate = context;
candidateID = ii;
}
@@ -577,7 +577,7 @@ WebGLRenderingContext::WebGLRenderingContext(HTMLCanvasElement* passedCanvas, Pa
// Create the DrawingBuffer and initialize the platform layer.
DrawingBuffer::PreserveDrawingBuffer preserve = preserveDrawingBuffer ? DrawingBuffer::Preserve : DrawingBuffer::Discard;
- m_drawingBuffer = DrawingBuffer::create(m_contextSupport.get(), clampedCanvasSize(), preserve, contextEvictionManager.release());
+ m_drawingBuffer = DrawingBuffer::create(m_context.get(), clampedCanvasSize(), preserve, contextEvictionManager.release());
if (!m_drawingBuffer->isZeroSized()) {
m_drawingBuffer->bind();
@@ -5432,7 +5432,7 @@ void WebGLRenderingContext::maybeRestoreContext(Timer<WebGLRenderingContext>*)
// Construct a new drawing buffer with the new GraphicsContext3D.
m_drawingBuffer->releaseResources();
DrawingBuffer::PreserveDrawingBuffer preserve = m_preserveDrawingBuffer ? DrawingBuffer::Preserve : DrawingBuffer::Discard;
- m_drawingBuffer = DrawingBuffer::create(contextSupport.get(), clampedCanvasSize(), preserve, contextEvictionManager.release());
+ m_drawingBuffer = DrawingBuffer::create(context.get(), clampedCanvasSize(), preserve, contextEvictionManager.release());
if (m_drawingBuffer->isZeroSized())
return;
« no previous file with comments | « no previous file | Source/platform/graphics/GraphicsContext3D.h » ('j') | Source/platform/graphics/gpu/DrawingBuffer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698