2010-09-03 James Robinson <jamesr@chromium.org>
authorjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Sep 2010 19:48:13 +0000 (19:48 +0000)
committerjamesr@google.com <jamesr@google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Sep 2010 19:48:13 +0000 (19:48 +0000)
        [chromium] Compile fixes for 66746

        * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
        (WebCore::SharedGraphicsContext3D::texImage2D):
        (WebCore::SharedGraphicsContext3D::texSubImage2D):
2010-09-03  James Robinson  <jamesr@chromium.org>

        [chromium] Compile fixes for 66746.

        * src/GraphicsContext3D.cpp:
        (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@66762 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/graphics/gpu/SharedGraphicsContext3D.cpp
WebKit/chromium/ChangeLog
WebKit/chromium/src/GraphicsContext3D.cpp

index 364bf74..be8704a 100644 (file)
@@ -1,3 +1,11 @@
+2010-09-03  James Robinson  <jamesr@chromium.org>
+
+        [chromium] Compile fixes for 66746
+
+        * platform/graphics/gpu/SharedGraphicsContext3D.cpp:
+        (WebCore::SharedGraphicsContext3D::texImage2D):
+        (WebCore::SharedGraphicsContext3D::texSubImage2D):
+
 2010-09-03  Chris Rogers  <crogers@google.com>
 
         Reviewed by Kenneth Russell.
index fa75b95..6424293 100644 (file)
@@ -144,12 +144,12 @@ void SharedGraphicsContext3D::texParameteri(unsigned target, unsigned pname, int
 
 int SharedGraphicsContext3D::texImage2D(unsigned target, unsigned level, unsigned internalformat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, void* pixels)
 {
-    m_context->texImage2D(target, level, internalformat, width, height, border, format, type, pixels);
+    return m_context->texImage2D(target, level, internalformat, width, height, border, format, type, pixels);
 }
 
 int SharedGraphicsContext3D::texSubImage2D(unsigned target, unsigned level, unsigned xoffset, unsigned yoffset, unsigned width, unsigned height, unsigned format, unsigned type, void* pixels)
 {
-    m_context->texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
+    return m_context->texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
 }
 
 void SharedGraphicsContext3D::readPixels(long x, long y, unsigned long width, unsigned long height, unsigned long format, unsigned long type, void* data)
index ca17eb9..1070291 100644 (file)
@@ -1,3 +1,10 @@
+2010-09-03  James Robinson  <jamesr@chromium.org>
+
+        [chromium] Compile fixes for 66746.
+
+        * src/GraphicsContext3D.cpp:
+        (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):
+
 2010-09-03  Tony Chang  <tony@chromium.org>
 
         Unreviewed, remove svn:executable flag from images and css files.
index 6a9b3e4..bc202c7 100644 (file)
@@ -436,10 +436,10 @@ void GraphicsContext3DInternal::paintRenderingResultsToCanvas(CanvasRenderingCon
         canvas.drawBitmapRect(m_resizingBitmap, 0, dst);
     }
 #elif PLATFORM(CG)
-    if (m_renderOutput)
-        context->graphicsContext3D()->paintToCanvas(m_renderOutput, m_impl->width(), m_impl->height(),
-                                                    canvas->width(), canvas->height(),
-                                                    imageBuffer->context()->platformContext());
+    if (m_renderOutput && context->is3d()) {
+        WebGLRenderingContext* webGLContext = static_cast<WebGLRenderingContext*>(context);
+        webGLContext->graphicsContext3D()->paintToCanvas(m_renderOutput, m_impl->width(), m_impl->height(), canvas->width(), canvas->height(), imageBuffer->context()->platformContext());
+    }
 #else
 #error Must port to your platform
 #endif