[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

jamesr at google.com jamesr at google.com
Wed Dec 22 12:40:31 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit be759374d6b99195e35cd51469d9457e4ba1bce2
Author: jamesr at google.com <jamesr at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 27 00:17:05 2010 +0000

    2010-08-26  James Robinson  <jamesr at chromium.org>
    
            Reviewed by Darin Fisher.
    
            [chromium] Remove the USE(GLES2_RENDERING) define and associated code
            https://bugs.webkit.org/show_bug.cgi?id=43761
    
            Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused.
    
            * wtf/Platform.h:
    2010-08-26  James Robinson  <jamesr at chromium.org>
    
            Reviewed by Darin Fisher.
    
            [chromium] Remove the USE(GLES2_RENDERING) define and associated code
            https://bugs.webkit.org/show_bug.cgi?id=43761
    
            USE(GLES2_RENDERING) will not be useful since we'll be coding to GraphicsContext3D
            instead of OpenGL and can use ENABLE(ACCELERATED_2D_CANVAS) for canvas 2d specific
            changes.  This deletes the macro and deletes the ChromeClient API to query
            GLES2Contexts since we'll never need one of these outside of the compositor, which
            is created in platform-specific code.
    
            * loader/EmptyClients.h:
            * page/ChromeClient.h:
            * platform/graphics/chromium/GLES2Canvas.cpp:
            * platform/graphics/chromium/GLES2Canvas.h:
            * platform/graphics/chromium/GLES2Texture.cpp:
            * platform/graphics/chromium/GLES2Texture.h:
            * platform/graphics/skia/GraphicsContextSkia.cpp:
            (WebCore::GraphicsContext::savePlatformState):
            (WebCore::GraphicsContext::restorePlatformState):
            (WebCore::GraphicsContext::clearRect):
            (WebCore::GraphicsContext::concatCTM):
            (WebCore::GraphicsContext::fillRect):
            (WebCore::GraphicsContext::scale):
            (WebCore::GraphicsContext::setAlpha):
            (WebCore::GraphicsContext::setCompositeOperation):
            (WebCore::GraphicsContext::setPlatformFillColor):
            (WebCore::GraphicsContext::rotate):
            (WebCore::GraphicsContext::translate):
            (WebCore::GraphicsContext::setGraphicsContext3D):
            (WebCore::GraphicsContext::syncSoftwareCanvas):
            * platform/graphics/skia/ImageSkia.cpp:
            (WebCore::drawBitmapGLES2):
            (WebCore::BitmapImage::draw):
            (WebCore::BitmapImageSingleFrameSkia::draw):
            * platform/graphics/skia/PlatformContextSkia.cpp:
            (WebCore::PlatformContextSkia::PlatformContextSkia):
            (WebCore::PlatformContextSkia::~PlatformContextSkia):
            * platform/graphics/skia/PlatformContextSkia.h:
    2010-08-26  James Robinson  <jamesr at chromium.org>
    
            Reviewed by Darin Fisher.
    
            [chromium] Remove the USE(GLES2_RENDERING) define and associated code
            https://bugs.webkit.org/show_bug.cgi?id=43761
    
            Removes API support to grab a GLES2Context from within WebCore.  The compositor
            has a special codepath to grab its GLES2Context and no other codepaths
            need access to a raw context.  Accelerated drawing elsewhere will go through
            GraphicsContext3D.
    
            * src/ChromeClientImpl.cpp:
            * src/ChromeClientImpl.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66155 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/JavaScriptCore/ChangeLog b/JavaScriptCore/ChangeLog
index 6bddcd2..e437156 100644
--- a/JavaScriptCore/ChangeLog
+++ b/JavaScriptCore/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-26  James Robinson  <jamesr at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        [chromium] Remove the USE(GLES2_RENDERING) define and associated code
+        https://bugs.webkit.org/show_bug.cgi?id=43761
+
+        Remove WTF_USE_GLES2_RENDERING from the list of defines in chromium, it's unused.
+
+        * wtf/Platform.h:
+
 2010-08-26  Gavin Barraclough  <barraclough at apple.com>
 
         Rolling out r64608, this regressed performance.
diff --git a/JavaScriptCore/wtf/Platform.h b/JavaScriptCore/wtf/Platform.h
index f653adb..2f27485 100644
--- a/JavaScriptCore/wtf/Platform.h
+++ b/JavaScriptCore/wtf/Platform.h
@@ -528,7 +528,6 @@
 #define WTF_USE_CORE_TEXT 1
 #else
 #define WTF_PLATFORM_SKIA 1
-#define WTF_USE_GLES2_RENDERING 1
 #endif
 #endif
 
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index f3f29dd..94ff778 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,45 @@
+2010-08-26  James Robinson  <jamesr at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        [chromium] Remove the USE(GLES2_RENDERING) define and associated code
+        https://bugs.webkit.org/show_bug.cgi?id=43761
+
+        USE(GLES2_RENDERING) will not be useful since we'll be coding to GraphicsContext3D
+        instead of OpenGL and can use ENABLE(ACCELERATED_2D_CANVAS) for canvas 2d specific
+        changes.  This deletes the macro and deletes the ChromeClient API to query
+        GLES2Contexts since we'll never need one of these outside of the compositor, which
+        is created in platform-specific code.
+
+        * loader/EmptyClients.h:
+        * page/ChromeClient.h:
+        * platform/graphics/chromium/GLES2Canvas.cpp:
+        * platform/graphics/chromium/GLES2Canvas.h:
+        * platform/graphics/chromium/GLES2Texture.cpp:
+        * platform/graphics/chromium/GLES2Texture.h:
+        * platform/graphics/skia/GraphicsContextSkia.cpp:
+        (WebCore::GraphicsContext::savePlatformState):
+        (WebCore::GraphicsContext::restorePlatformState):
+        (WebCore::GraphicsContext::clearRect):
+        (WebCore::GraphicsContext::concatCTM):
+        (WebCore::GraphicsContext::fillRect):
+        (WebCore::GraphicsContext::scale):
+        (WebCore::GraphicsContext::setAlpha):
+        (WebCore::GraphicsContext::setCompositeOperation):
+        (WebCore::GraphicsContext::setPlatformFillColor):
+        (WebCore::GraphicsContext::rotate):
+        (WebCore::GraphicsContext::translate):
+        (WebCore::GraphicsContext::setGraphicsContext3D):
+        (WebCore::GraphicsContext::syncSoftwareCanvas):
+        * platform/graphics/skia/ImageSkia.cpp:
+        (WebCore::drawBitmapGLES2):
+        (WebCore::BitmapImage::draw):
+        (WebCore::BitmapImageSingleFrameSkia::draw):
+        * platform/graphics/skia/PlatformContextSkia.cpp:
+        (WebCore::PlatformContextSkia::PlatformContextSkia):
+        (WebCore::PlatformContextSkia::~PlatformContextSkia):
+        * platform/graphics/skia/PlatformContextSkia.h:
+
 2010-08-26  Martin Robinson  <mrobinson at igalia.com>
 
         Build fix for GTK+, after a bad merge.
diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h
index 45fd931..270752d 100644
--- a/WebCore/loader/EmptyClients.h
+++ b/WebCore/loader/EmptyClients.h
@@ -46,10 +46,6 @@
 #include "ResourceError.h"
 #include "SearchPopupMenu.h"
 
-#if USE(GLES2_RENDERING)
-#include "GLES2Context.h"
-#endif
-
 /*
  This file holds empty Client stubs for use by WebCore.
  Viewless element needs to create a dummy Page->Frame->FrameView tree for use in parsing or executing JavaScript.
@@ -199,11 +195,6 @@ public:
     virtual void scheduleCompositingLayerSync() {};
 #endif
 
-#if USE(GLES2_RENDERING)
-    virtual PassOwnPtr<GLES2Context> getOnscreenGLES2Context() { return 0; }
-    virtual PassOwnPtr<GLES2Context> getOffscreenGLES2Context() { return 0; }
-#endif
-
 #if PLATFORM(WIN)
     virtual void setLastSetCursorToCurrentCursor() { }
 #endif
diff --git a/WebCore/page/ChromeClient.h b/WebCore/page/ChromeClient.h
index d0bdd1e..60b73c3 100644
--- a/WebCore/page/ChromeClient.h
+++ b/WebCore/page/ChromeClient.h
@@ -68,10 +68,6 @@ namespace WebCore {
     class GraphicsLayer;
 #endif
 
-#if USE(GLES2_RENDERING)
-    class GLES2Context;
-#endif
-
 #if ENABLE(NOTIFICATIONS)
     class NotificationPresenter;
 #endif
@@ -234,12 +230,6 @@ namespace WebCore {
         virtual bool allowsAcceleratedCompositing() const { return true; }
 #endif
 
-#if USE(GLES2_RENDERING)
-        // Request a GL ES 2 context to use for compositing this page's content.
-        virtual PassOwnPtr<GLES2Context> getOnscreenGLES2Context() = 0;
-        virtual PassOwnPtr<GLES2Context> getOffscreenGLES2Context() = 0;
-#endif
-
         virtual bool supportsFullscreenForNode(const Node*) { return false; }
         virtual void enterFullscreenForNode(Node*) { }
         virtual void exitFullscreenForNode(Node*) { }
diff --git a/WebCore/platform/graphics/chromium/GLES2Canvas.cpp b/WebCore/platform/graphics/chromium/GLES2Canvas.cpp
index 63bd53b..6463f32 100644
--- a/WebCore/platform/graphics/chromium/GLES2Canvas.cpp
+++ b/WebCore/platform/graphics/chromium/GLES2Canvas.cpp
@@ -30,8 +30,6 @@
 
 #include "config.h"
 
-#if USE(GLES2_RENDERING)
-
 #include "GLES2Canvas.h"
 
 #include "FloatRect.h"
@@ -372,4 +370,3 @@ void GLES2Canvas::checkGLError(const char* header)
 
 }
 
-#endif
diff --git a/WebCore/platform/graphics/chromium/GLES2Canvas.h b/WebCore/platform/graphics/chromium/GLES2Canvas.h
index 959825b..169e77e 100644
--- a/WebCore/platform/graphics/chromium/GLES2Canvas.h
+++ b/WebCore/platform/graphics/chromium/GLES2Canvas.h
@@ -31,8 +31,6 @@
 #ifndef GLES2Canvas_h
 #define GLES2Canvas_h
 
-#if USE(GLES2_RENDERING)
-
 #include "AffineTransform.h"
 #include "Color.h"
 #include "ColorSpace.h"
@@ -102,6 +100,4 @@ private:
 
 }
 
-#endif
-
 #endif // GLES2Canvas_h
diff --git a/WebCore/platform/graphics/chromium/GLES2Texture.cpp b/WebCore/platform/graphics/chromium/GLES2Texture.cpp
index ae230db..eeeab88 100644
--- a/WebCore/platform/graphics/chromium/GLES2Texture.cpp
+++ b/WebCore/platform/graphics/chromium/GLES2Texture.cpp
@@ -30,8 +30,6 @@
 
 #include "config.h"
 
-#if USE(GLES2_RENDERING)
-
 #include "GLES2Texture.h"
 
 #include "GraphicsContext3D.h"
@@ -178,5 +176,3 @@ void GLES2Texture::bindTile(int tile)
 }
 
 }
-
-#endif
diff --git a/WebCore/platform/graphics/chromium/GLES2Texture.h b/WebCore/platform/graphics/chromium/GLES2Texture.h
index 43a4955..5fd37ca 100644
--- a/WebCore/platform/graphics/chromium/GLES2Texture.h
+++ b/WebCore/platform/graphics/chromium/GLES2Texture.h
@@ -31,8 +31,6 @@
 #ifndef GLES2Texture_h
 #define GLES2Texture_h
 
-#if USE(GLES2_RENDERING)
-
 #include "RefCounted.h"
 #include "RefPtr.h"
 #include "TilingData.h"
@@ -62,6 +60,4 @@ private:
 
 }
 
-#endif
-
 #endif // GLES2Texture_h
diff --git a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
index 1b20e26..b4fddd5 100644
--- a/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
@@ -34,6 +34,7 @@
 #include "AffineTransform.h"
 #include "Color.h"
 #include "FloatRect.h"
+#include "GLES2Canvas.h"
 #include "Gradient.h"
 #include "GraphicsContextPlatformPrivate.h"
 #include "GraphicsContextPrivate.h"
@@ -55,10 +56,6 @@
 #include <wtf/MathExtras.h>
 #include <wtf/UnusedParam.h>
 
-#if USE(GLES2_RENDERING)
-#include "GLES2Canvas.h"
-#endif
-
 using namespace std;
 
 namespace WebCore {
@@ -248,10 +245,8 @@ void GraphicsContext::savePlatformState()
     if (paintingDisabled())
         return;
 
-#if USE(GLES2_RENDERING)
     if (platformContext()->useGPU())
         platformContext()->gpuCanvas()->save();
-#endif
 
     // Save our private State.
     platformContext()->save();
@@ -262,10 +257,8 @@ void GraphicsContext::restorePlatformState()
     if (paintingDisabled())
         return;
 
-#if USE(GLES2_RENDERING)
     if (platformContext()->useGPU())
         platformContext()->gpuCanvas()->restore();
-#endif
 
     // Restore our private State.
     platformContext()->restore();
@@ -345,13 +338,11 @@ void GraphicsContext::clearRect(const FloatRect& rect)
     if (paintingDisabled())
         return;
 
-#if USE(GLES2_RENDERING)
     if (platformContext()->useGPU()) {
         platformContext()->prepareForHardwareDraw();
         platformContext()->gpuCanvas()->clearRect(rect);
         return;
     }
-#endif
 
     platformContext()->prepareForSoftwareDraw();
 
@@ -459,10 +450,8 @@ void GraphicsContext::concatCTM(const AffineTransform& affine)
     if (paintingDisabled())
         return;
 
-#if USE(GLES2_RENDERING)
     if (platformContext()->useGPU())
         platformContext()->gpuCanvas()->concatCTM(affine);
-#endif
 
     platformContext()->canvas()->concat(affine);
 }
@@ -780,13 +769,11 @@ void GraphicsContext::fillRect(const FloatRect& rect)
         ClipRectToCanvas(*platformContext()->canvas(), r, &r);
     }
 
-#if USE(GLES2_RENDERING)
     if (platformContext()->useGPU() && !m_common->state.fillPattern && !m_common->state.fillGradient && !platformContext()->getDrawLooper()) {
         platformContext()->prepareForHardwareDraw();
         platformContext()->gpuCanvas()->fillRect(rect);
         return;
     }
-#endif
 
     platformContext()->save();
 
@@ -804,13 +791,11 @@ void GraphicsContext::fillRect(const FloatRect& rect, const Color& color, ColorS
     if (paintingDisabled())
         return;
 
-#if USE(GLES2_RENDERING)
     if (platformContext()->useGPU() && !m_common->state.fillPattern && !m_common->state.fillGradient) {
         platformContext()->prepareForHardwareDraw();
         platformContext()->gpuCanvas()->fillRect(rect, color, colorSpace);
         return;
     }
-#endif
 
     platformContext()->prepareForSoftwareDraw();
 
@@ -932,10 +917,8 @@ void GraphicsContext::scale(const FloatSize& size)
     if (paintingDisabled())
         return;
 
-#if USE(GLES2_RENDERING)
     if (platformContext()->useGPU())
         platformContext()->gpuCanvas()->scale(size);
-#endif
 
     platformContext()->canvas()->scale(WebCoreFloatToSkScalar(size.width()),
         WebCoreFloatToSkScalar(size.height()));
@@ -945,10 +928,10 @@ void GraphicsContext::setAlpha(float alpha)
 {
     if (paintingDisabled())
         return;
-#if USE(GLES2_RENDERING)
+
     if (platformContext()->useGPU())
         platformContext()->gpuCanvas()->setAlpha(alpha);
-#endif
+
     platformContext()->setAlpha(alpha);
 }
 
@@ -956,10 +939,10 @@ void GraphicsContext::setCompositeOperation(CompositeOperator op)
 {
     if (paintingDisabled())
         return;
-#if USE(GLES2_RENDERING)
+
     if (platformContext()->useGPU())
         platformContext()->gpuCanvas()->setCompositeOperation(op);
-#endif
+
     platformContext()->setXfermodeMode(WebCoreCompositeToSkiaComposite(op));
 }
 
@@ -1046,10 +1029,9 @@ void GraphicsContext::setPlatformFillColor(const Color& color, ColorSpace colorS
 {
     if (paintingDisabled())
         return;
-#if USE(GLES2_RENDERING)
+
     if (platformContext()->useGPU())
         platformContext()->gpuCanvas()->setFillColor(color, colorSpace);
-#endif
 
     platformContext()->setFillColor(color.rgb());
 }
@@ -1241,10 +1223,8 @@ void GraphicsContext::rotate(float angleInRadians)
     if (paintingDisabled())
         return;
 
-#if USE(GLES2_RENDERING)
     if (platformContext()->useGPU())
         platformContext()->gpuCanvas()->rotate(angleInRadians);
-#endif
 
     platformContext()->canvas()->rotate(WebCoreFloatToSkScalar(
         angleInRadians * (180.0f / 3.14159265f)));
@@ -1255,10 +1235,8 @@ void GraphicsContext::translate(float w, float h)
     if (paintingDisabled())
         return;
 
-#if USE(GLES2_RENDERING)
     if (platformContext()->useGPU())
         platformContext()->gpuCanvas()->translate(w, h);
-#endif
 
     platformContext()->canvas()->translate(WebCoreFloatToSkScalar(w),
                                            WebCoreFloatToSkScalar(h));
@@ -1266,19 +1244,12 @@ void GraphicsContext::translate(float w, float h)
 
 void GraphicsContext::setGraphicsContext3D(GraphicsContext3D* context3D, const IntSize& size)
 {
-#if USE(GLES2_RENDERING)
     platformContext()->setGraphicsContext3D(context3D, size);
-#else
-    UNUSED_PARAM(context3D);
-    UNUSED_PARAM(size);
-#endif
 }
 
 void GraphicsContext::syncSoftwareCanvas()
 {
-#if USE(GLES2_RENDERING)
     platformContext()->syncSoftwareCanvas();
-#endif
 }
 
 }  // namespace WebCore
diff --git a/WebCore/platform/graphics/skia/ImageSkia.cpp b/WebCore/platform/graphics/skia/ImageSkia.cpp
index 1ff87cc..5af1090 100644
--- a/WebCore/platform/graphics/skia/ImageSkia.cpp
+++ b/WebCore/platform/graphics/skia/ImageSkia.cpp
@@ -36,22 +36,20 @@
 #include "ChromiumBridge.h"
 #include "FloatConversion.h"
 #include "FloatRect.h"
+#include "GLES2Canvas.h"
+#include "GLES2Context.h"
 #include "GraphicsContext.h"
 #include "Logging.h"
 #include "NativeImageSkia.h"
 #include "PlatformContextSkia.h"
 #include "PlatformString.h"
-#include "SkiaUtils.h"
+#include "SkPixelRef.h"
 #include "SkRect.h"
 #include "SkShader.h"
+#include "SkiaUtils.h"
 
 #include "skia/ext/image_operations.h"
 #include "skia/ext/platform_canvas.h"
-#if USE(GLES2_RENDERING)
-#include "GLES2Canvas.h"
-#include "GLES2Context.h"
-#include "SkPixelRef.h"
-#endif
 
 namespace WebCore {
 
@@ -409,7 +407,6 @@ void Image::drawPattern(GraphicsContext* context,
     context->platformContext()->paintSkPaint(destRect, paint);
 }
 
-#if USE(GLES2_RENDERING)
 static void drawBitmapGLES2(GraphicsContext* ctxt, NativeImageSkia* bitmap, const FloatRect& srcRect, const FloatRect& dstRect, ColorSpace styleColorSpace, CompositeOperator compositeOp)
 {
     ctxt->platformContext()->prepareForHardwareDraw();
@@ -425,7 +422,6 @@ static void drawBitmapGLES2(GraphicsContext* ctxt, NativeImageSkia* bitmap, cons
     }
     gpuCanvas->drawTexturedRect(texture, srcRect, dstRect, styleColorSpace, compositeOp);
 }
-#endif
 
 // ================================================
 // BitmapImage Class
@@ -472,12 +468,11 @@ void BitmapImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect,
     if (normSrcRect.isEmpty() || normDstRect.isEmpty())
         return;  // Nothing to draw.
 
-#if  USE(GLES2_RENDERING)
     if (ctxt->platformContext()->useGPU()) {
         drawBitmapGLES2(ctxt, bm, normSrcRect, normDstRect, colorSpace, compositeOp);
         return;
     }
-#endif
+
     ctxt->platformContext()->prepareForSoftwareDraw();
 
     paintSkBitmap(ctxt->platformContext(),
@@ -501,12 +496,10 @@ void BitmapImageSingleFrameSkia::draw(GraphicsContext* ctxt,
     if (normSrcRect.isEmpty() || normDstRect.isEmpty())
         return;  // Nothing to draw.
 
-#if  USE(GLES2_RENDERING)
     if (ctxt->platformContext()->useGPU()) {
         drawBitmapGLES2(ctxt, &m_nativeImage, srcRect, dstRect, styleColorSpace, compositeOp);
         return;
     }
-#endif
 
     ctxt->platformContext()->prepareForSoftwareDraw();
 
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
index b9de0a2..af0c4c4 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
@@ -34,7 +34,10 @@
 
 #include "AffineTransform.h"
 #include "CanvasLayerChromium.h"
+#include "GLES2Canvas.h"
+#include "GLES2Texture.h"
 #include "GraphicsContext.h"
+#include "GraphicsContext3D.h"
 #include "ImageBuffer.h"
 #include "NativeImageSkia.h"
 #include "PlatformContextSkia.h"
@@ -49,12 +52,6 @@
 #include "SkShader.h"
 #include "SkDashPathEffect.h"
 
-#if USE(GLES2_RENDERING)
-#include "GraphicsContext3D.h"
-#include "GLES2Canvas.h"
-#include "GLES2Texture.h"
-#endif
-
 #include <wtf/MathExtras.h>
 #include <wtf/OwnArrayPtr.h>
 #include <wtf/Vector.h>
@@ -210,11 +207,9 @@ PlatformContextSkia::PlatformContextSkia(skia::PlatformCanvas* canvas)
 #if OS(WINDOWS)
     , m_drawingToImageBuffer(false)
 #endif
-#if USE(GLES2_RENDERING)
     , m_useGPU(false)
     , m_gpuCanvas(0)
     , m_backingStoreState(None)
-#endif
 {
     m_stateStack.append(State());
     m_state = &m_stateStack.last();
@@ -222,7 +217,7 @@ PlatformContextSkia::PlatformContextSkia(skia::PlatformCanvas* canvas)
 
 PlatformContextSkia::~PlatformContextSkia()
 {
-#if USE(GLES2_RENDERING) && USE(ACCELERATED_COMPOSITING)
+#if USE(ACCELERATED_COMPOSITING)
     if (m_gpuCanvas) {
         CanvasLayerChromium* layer = static_cast<CanvasLayerChromium*>(m_gpuCanvas->context()->platformLayer());
         layer->setPrepareTextureCallback(0);
@@ -684,7 +679,6 @@ void PlatformContextSkia::applyAntiAliasedClipPaths(WTF::Vector<SkPath>& paths)
     m_canvas->restore();
 }
 
-#if USE(GLES2_RENDERING)
 #if USE(ACCELERATED_COMPOSITING)
 class PrepareTextureCallbackImpl : public CanvasLayerChromium::PrepareTextureCallback {
 public:
@@ -823,5 +817,4 @@ void PlatformContextSkia::readbackHardwareToSoftware() const
     }
 }
 
-#endif
 } // namespace WebCore
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.h b/WebCore/platform/graphics/skia/PlatformContextSkia.h
index 6c84797..fc0fb0b 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.h
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.h
@@ -45,12 +45,10 @@
 
 namespace WebCore {
 
-#if USE(GLES2_RENDERING)
 enum CompositeOperator;
 class GLES2Canvas;
 class GLES2Texture;
 class GraphicsContext3D;
-#endif
 
 // This class holds the platform-specific state for GraphicsContext. We put
 // most of our Skia wrappers on this class. In theory, a lot of this stuff could
@@ -182,24 +180,16 @@ public:
     void setImageResamplingHint(const IntSize& srcSize, const FloatSize& dstSize);
     void clearImageResamplingHint();
     bool hasImageResamplingHint() const;
-#if USE(GLES2_RENDERING)
     bool useGPU() { return m_useGPU; }
     void setGraphicsContext3D(GraphicsContext3D*, const IntSize&);
     GLES2Canvas* gpuCanvas() const { return m_gpuCanvas.get(); }
-#endif
 
-#if USE(GLES2_RENDERING)
     // Call these before making a call that manipulates the underlying
     // skia::PlatformCanvas or WebCore::GLES2Canvas
     void prepareForSoftwareDraw() const;
     void prepareForHardwareDraw() const;
     // Call to force the skia::PlatformCanvas to contain all rendering results.
     void syncSoftwareCanvas() const;
-#else
-    void prepareForSoftwareDraw() const {}
-    void prepareForHardwareDraw() const {}
-    void syncSoftwareCanvas() const {}
-#endif
 
 private:
 #if OS(LINUX) || OS(WINDOWS)
@@ -209,10 +199,8 @@ private:
 #endif
     void applyAntiAliasedClipPaths(WTF::Vector<SkPath>& paths);
 
-#if USE(GLES2_RENDERING)
     void uploadSoftwareToHardware(CompositeOperator) const;
     void readbackHardwareToSoftware() const;
-#endif
 
     // Defines drawing style.
     struct State;
@@ -237,12 +225,10 @@ private:
 #if OS(WINDOWS)
     bool m_drawingToImageBuffer;
 #endif
-#if USE(GLES2_RENDERING)
     bool m_useGPU;
     OwnPtr<GLES2Canvas> m_gpuCanvas;
     mutable enum { None, Software, Mixed, Hardware } m_backingStoreState;
     mutable RefPtr<GLES2Texture> m_uploadTexture;
-#endif
 };
 
 }
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 027ca75..56c41a7 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,18 @@
+2010-08-26  James Robinson  <jamesr at chromium.org>
+
+        Reviewed by Darin Fisher.
+
+        [chromium] Remove the USE(GLES2_RENDERING) define and associated code
+        https://bugs.webkit.org/show_bug.cgi?id=43761
+
+        Removes API support to grab a GLES2Context from within WebCore.  The compositor
+        has a special codepath to grab its GLES2Context and no other codepaths
+        need access to a raw context.  Accelerated drawing elsewhere will go through
+        GraphicsContext3D.
+
+        * src/ChromeClientImpl.cpp:
+        * src/ChromeClientImpl.h:
+
 2010-08-26  Ryosuke Niwa  <rniwa at webkit.org>
 
         Reviewed by Eric Seidel.
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index 6704f4f..df3e999 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -86,7 +86,7 @@
       ],
 
       'conditions': [
-        ['OS=="win" or OS=="linux"', {
+        ['OS=="win" or OS=="linux" or OS=="mac"', {
           'feature_defines': [
            'WTF_USE_ACCELERATED_COMPOSITING=1',
            'ENABLE_3D_RENDERING=1',
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index 405fbf6..f4e26b6 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -744,18 +744,6 @@ void ChromeClientImpl::scheduleCompositingLayerSync()
 }
 #endif
 
-#if USE(GLES2_RENDERING)
-PassOwnPtr<GLES2Context> ChromeClientImpl::getOnscreenGLES2Context()
-{
-    return m_webView->getOnscreenGLES2Context();
-}
-
-PassOwnPtr<GLES2Context> ChromeClientImpl::getOffscreenGLES2Context()
-{
-    return m_webView->getOffscreenGLES2Context();
-}
-#endif
-
 bool ChromeClientImpl::supportsFullscreenForNode(const WebCore::Node* node)
 {
     if (m_webView->client() && node->hasTagName(WebCore::HTMLNames::videoTag))
diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h
index 8763def..1981641 100644
--- a/WebKit/chromium/src/ChromeClientImpl.h
+++ b/WebKit/chromium/src/ChromeClientImpl.h
@@ -152,11 +152,6 @@ public:
     virtual void scheduleCompositingLayerSync();
 #endif
 
-#if USE(GLES2_RENDERING)
-    virtual PassOwnPtr<WebCore::GLES2Context> getOnscreenGLES2Context();
-    virtual PassOwnPtr<WebCore::GLES2Context> getOffscreenGLES2Context();
-#endif
-
     virtual bool supportsFullscreenForNode(const WebCore::Node*);
     virtual void enterFullscreenForNode(WebCore::Node*);
     virtual void exitFullscreenForNode(WebCore::Node*);

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list