Title: [95192] trunk/Source
Revision
95192
Author
commit-qu...@webkit.org
Date
2011-09-15 08:13:15 -0700 (Thu, 15 Sep 2011)

Log Message

Source/WebCore: [Skia/Chrome] Cleanup unneeded code now that GrGLInterface is used to set GL ctx per GL call.
https://bugs.webkit.org/show_bug.cgi?id=68096

Patch by Brian Salomon <bsalo...@google.com> on 2011-09-15
Reviewed by Stephen White.

This change removes PlatformContextSkia::makeGrContextCurrent now that
GrGLInterface is used to set the context on every Skia GL call.

Tested by every canvas layout test.

* platform/graphics/chromium/FontLinux.cpp:
(WebCore::Font::drawGlyphs):
* platform/graphics/skia/FontSkia.cpp:
(WebCore::Font::drawGlyphs):
* platform/graphics/skia/GraphicsContextSkia.cpp:
(WebCore::GraphicsContext::clearRect):
(WebCore::GraphicsContext::clip):
(WebCore::GraphicsContext::drawConvexPolygon):
(WebCore::GraphicsContext::drawEllipse):
(WebCore::GraphicsContext::drawFocusRing):
(WebCore::GraphicsContext::drawLine):
(WebCore::GraphicsContext::drawLineForTextChecking):
(WebCore::GraphicsContext::drawLineForText):
(WebCore::GraphicsContext::drawRect):
(WebCore::GraphicsContext::fillPath):
(WebCore::GraphicsContext::fillRect):
(WebCore::GraphicsContext::fillRoundedRect):
(WebCore::GraphicsContext::strokeArc):
(WebCore::GraphicsContext::strokePath):
(WebCore::GraphicsContext::strokeRect):
* platform/graphics/skia/ImageBufferSkia.cpp:
(WebCore::ImageBuffer::ImageBuffer):
(WebCore::ImageBuffer::~ImageBuffer):
(WebCore::ImageBuffer::copyImage):
(WebCore::ImageBuffer::draw):
(WebCore::ImageBuffer::drawPattern):
(WebCore::ImageBuffer::getUnmultipliedImageData):
(WebCore::ImageBuffer::getPremultipliedImageData):
(WebCore::ImageBuffer::putUnmultipliedImageData):
(WebCore::ImageBuffer::putPremultipliedImageData):
(WebCore::ImageBuffer::toDataURL):
* platform/graphics/skia/ImageSkia.cpp:
(WebCore::BitmapImage::draw):
(WebCore::BitmapImageSingleFrameSkia::draw):
* platform/graphics/skia/PlatformContextSkia.cpp:
(WebCore::PlatformContextSkia::clipPathAntiAliased):
(WebCore::PlatformContextSkia::setGraphicsContext3D):
* platform/graphics/skia/PlatformContextSkia.h:
* platform/graphics/skia/SkiaFontWin.cpp:
(WebCore::paintSkiaText):

Source/WebKit/chromium: [Skia/Chrome]
https://bugs.webkit.org/show_bug.cgi?id=68096

This change removes WebGraphicsContext3D::grGLInterface(). It has been
superceded by WebGraphicsContext3D::createGrGLInterface which sets up
the per-GL call callback used to set the correct context.

Patch by Brian Salomon <bsalo...@google.com> on 2011-09-15
Reviewed by Stephen White.

* public/WebGraphicsContext3D.h:
* src/GraphicsContext3DChromium.cpp:
(WebCore::GraphicsContext3DPrivate::grContext):
* src/WebGraphicsContext3D.cpp:
(WebKit::WebGraphicsContext3D::createGrGLInterface):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (95191 => 95192)


--- trunk/Source/WebCore/ChangeLog	2011-09-15 14:42:33 UTC (rev 95191)
+++ trunk/Source/WebCore/ChangeLog	2011-09-15 15:13:15 UTC (rev 95192)
@@ -1,3 +1,56 @@
+2011-09-15  Brian Salomon  <bsalo...@google.com>
+
+        [Skia/Chrome] Cleanup unneeded code now that GrGLInterface is used to set GL ctx per GL call.
+        https://bugs.webkit.org/show_bug.cgi?id=68096
+
+        Reviewed by Stephen White.
+
+        This change removes PlatformContextSkia::makeGrContextCurrent now that
+        GrGLInterface is used to set the context on every Skia GL call.
+
+        Tested by every canvas layout test.
+
+        * platform/graphics/chromium/FontLinux.cpp:
+        (WebCore::Font::drawGlyphs):
+        * platform/graphics/skia/FontSkia.cpp:
+        (WebCore::Font::drawGlyphs):
+        * platform/graphics/skia/GraphicsContextSkia.cpp:
+        (WebCore::GraphicsContext::clearRect):
+        (WebCore::GraphicsContext::clip):
+        (WebCore::GraphicsContext::drawConvexPolygon):
+        (WebCore::GraphicsContext::drawEllipse):
+        (WebCore::GraphicsContext::drawFocusRing):
+        (WebCore::GraphicsContext::drawLine):
+        (WebCore::GraphicsContext::drawLineForTextChecking):
+        (WebCore::GraphicsContext::drawLineForText):
+        (WebCore::GraphicsContext::drawRect):
+        (WebCore::GraphicsContext::fillPath):
+        (WebCore::GraphicsContext::fillRect):
+        (WebCore::GraphicsContext::fillRoundedRect):
+        (WebCore::GraphicsContext::strokeArc):
+        (WebCore::GraphicsContext::strokePath):
+        (WebCore::GraphicsContext::strokeRect):
+        * platform/graphics/skia/ImageBufferSkia.cpp:
+        (WebCore::ImageBuffer::ImageBuffer):
+        (WebCore::ImageBuffer::~ImageBuffer):
+        (WebCore::ImageBuffer::copyImage):
+        (WebCore::ImageBuffer::draw):
+        (WebCore::ImageBuffer::drawPattern):
+        (WebCore::ImageBuffer::getUnmultipliedImageData):
+        (WebCore::ImageBuffer::getPremultipliedImageData):
+        (WebCore::ImageBuffer::putUnmultipliedImageData):
+        (WebCore::ImageBuffer::putPremultipliedImageData):
+        (WebCore::ImageBuffer::toDataURL):
+        * platform/graphics/skia/ImageSkia.cpp:
+        (WebCore::BitmapImage::draw):
+        (WebCore::BitmapImageSingleFrameSkia::draw):
+        * platform/graphics/skia/PlatformContextSkia.cpp:
+        (WebCore::PlatformContextSkia::clipPathAntiAliased):
+        (WebCore::PlatformContextSkia::setGraphicsContext3D):
+        * platform/graphics/skia/PlatformContextSkia.h:
+        * platform/graphics/skia/SkiaFontWin.cpp:
+        (WebCore::paintSkiaText):
+
 2011-09-15  Peter Beverloo  <pe...@chromium.org>
 
         [Chromium] Make sure that the ARM NEON files build with -marm

Modified: trunk/Source/WebCore/platform/graphics/chromium/FontLinux.cpp (95191 => 95192)


--- trunk/Source/WebCore/platform/graphics/chromium/FontLinux.cpp	2011-09-15 14:42:33 UTC (rev 95191)
+++ trunk/Source/WebCore/platform/graphics/chromium/FontLinux.cpp	2011-09-15 15:13:15 UTC (rev 95192)
@@ -110,8 +110,6 @@
         y += SkFloatToScalar(adv[i].height());
     }
 
-    gc->platformContext()->makeGrContextCurrent();
-
     SkCanvas* canvas = gc->platformContext()->canvas();
     TextDrawingModeFlags textMode = gc->platformContext()->getTextDrawingMode();
 

Modified: trunk/Source/WebCore/platform/graphics/skia/FontSkia.cpp (95191 => 95192)


--- trunk/Source/WebCore/platform/graphics/skia/FontSkia.cpp	2011-09-15 14:42:33 UTC (rev 95191)
+++ trunk/Source/WebCore/platform/graphics/skia/FontSkia.cpp	2011-09-15 15:13:15 UTC (rev 95192)
@@ -126,8 +126,6 @@
         y += SkFloatToScalar(adv[i].height);
     }
 
-    gc->platformContext()->makeGrContextCurrent();
-
     SkCanvas* canvas = gc->platformContext()->canvas();
     TextDrawingModeFlags textMode = gc->platformContext()->getTextDrawingMode();
 

Modified: trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp (95191 => 95192)


--- trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp	2011-09-15 14:42:33 UTC (rev 95191)
+++ trunk/Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp	2011-09-15 15:13:15 UTC (rev 95192)
@@ -335,8 +335,6 @@
     if (!isRectSkiaSafe(getCTM(), r))
         ClipRectToCanvas(*platformContext()->canvas(), r, &r);
 
-    platformContext()->makeGrContextCurrent();
-
     SkPaint paint;
     platformContext()->setupPaintForFilling(&paint);
     paint.setXfermodeMode(SkXfermode::kClear_Mode);
@@ -352,7 +350,6 @@
     if (!isRectSkiaSafe(getCTM(), r))
         return;
 
-    platformContext()->makeGrContextCurrent();
     platformContext()->canvas()->clipRect(r);
 }
 
@@ -456,8 +453,6 @@
     if (numPoints <= 1)
         return;
 
-    platformContext()->makeGrContextCurrent();
-
     SkPath path;
     setPathFromConvexPoints(&path, numPoints, points);
 
@@ -505,7 +500,6 @@
     if (!isRectSkiaSafe(getCTM(), rect))
         return;
 
-    platformContext()->makeGrContextCurrent();
     SkPaint paint;
     platformContext()->setupPaintForFilling(&paint);
     platformContext()->canvas()->drawOval(rect, paint);
@@ -562,7 +556,6 @@
     if (!rectCount)
         return;
 
-    platformContext()->makeGrContextCurrent();
     SkRegion focusRingRegion;
     const SkScalar focusRingOutset = getFocusRingOutset(width);
     for (unsigned i = 0; i < rectCount; i++) {
@@ -597,8 +590,6 @@
     if (!isPointSkiaSafe(getCTM(), point1) || !isPointSkiaSafe(getCTM(), point2))
         return;
 
-    platformContext()->makeGrContextCurrent();
-
     FloatPoint p1 = point1;
     FloatPoint p2 = point2;
     bool isVerticalLine = (p1.x() == p2.x());
@@ -643,8 +634,6 @@
     if (paintingDisabled())
         return;
 
-    platformContext()->makeGrContextCurrent();
-
     // Create the pattern we'll use to draw the underline.
     static SkBitmap* misspellBitmap = 0;
     if (!misspellBitmap) {
@@ -725,8 +714,6 @@
     if (width <= 0)
         return;
 
-    platformContext()->makeGrContextCurrent();
-
     int thickness = SkMax32(static_cast<int>(strokeThickness()), 1);
     SkRect r;
     r.fLeft = WebCoreFloatToSkScalar(pt.x());
@@ -747,8 +734,6 @@
     if (paintingDisabled())
         return;
 
-    platformContext()->makeGrContextCurrent();
-
     SkRect r = rect;
     if (!isRectSkiaSafe(getCTM(), r)) {
         // See the fillRect below.
@@ -767,8 +752,6 @@
     if (!isPathSkiaSafe(getCTM(), path))
       return;
 
-    platformContext()->makeGrContextCurrent();
-
     const GraphicsContextState& state = m_state;
     path.setFillType(state.fillRule == RULE_EVENODD ?
         SkPath::kEvenOdd_FillType : SkPath::kWinding_FillType);
@@ -792,8 +775,6 @@
 
     platformContext()->save();
 
-    platformContext()->makeGrContextCurrent();
-
     SkPaint paint;
     platformContext()->setupPaintForFilling(&paint);
     platformContext()->canvas()->drawRect(r, paint);
@@ -806,8 +787,6 @@
     if (paintingDisabled())
         return;
 
-    platformContext()->makeGrContextCurrent();
-
     SkRect r = rect;
     if (!isRectSkiaSafe(getCTM(), r)) {
         // Special case when the rectangle overflows fixed point. This is a
@@ -840,8 +819,6 @@
     if (paintingDisabled())
         return;
 
-    platformContext()->makeGrContextCurrent();
-
     SkRect r = rect;
     if (!isRectSkiaSafe(getCTM(), r))
         // See fillRect().
@@ -1129,8 +1106,6 @@
     if (paintingDisabled())
         return;
 
-    platformContext()->makeGrContextCurrent();
-
     SkPaint paint;
     SkRect oval = r;
     if (strokeStyle() == NoStroke) {
@@ -1162,8 +1137,6 @@
     if (!isPathSkiaSafe(getCTM(), path))
         return;
 
-    platformContext()->makeGrContextCurrent();
-
     SkPaint paint;
     platformContext()->setupPaintForStroking(&paint, 0, 0);
     platformContext()->canvas()->drawPath(path, paint);
@@ -1177,8 +1150,6 @@
     if (!isRectSkiaSafe(getCTM(), rect))
         return;
 
-    platformContext()->makeGrContextCurrent();
-
     SkPaint paint;
     platformContext()->setupPaintForStroking(&paint, 0, 0);
     paint.setStrokeWidth(WebCoreFloatToSkScalar(lineWidth));

Modified: trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp (95191 => 95192)


--- trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp	2011-09-15 14:42:33 UTC (rev 95191)
+++ trunk/Source/WebCore/platform/graphics/skia/ImageBufferSkia.cpp	2011-09-15 15:13:15 UTC (rev 95192)
@@ -86,7 +86,6 @@
     if (renderingMode == Accelerated) {
         GraphicsContext3D* context3D = SharedGraphicsContext3D::create(0);
         if (context3D) {
-            context3D->makeContextCurrent();
             GrContext* gr = context3D->grContext();
             if (gr) {
                 gr->resetContext();
@@ -118,10 +117,6 @@
     if (m_data.m_platformLayer)
         m_data.m_platformLayer->setTextureId(0);
 #endif
-    if (m_context && m_context->platformContext()) {
-        // This is so that the SkGpuDevice destructor has the correct context.
-        m_context->platformContext()->makeGrContextCurrent();
-    }
 }
 
 GraphicsContext* ImageBuffer::context() const
@@ -137,7 +132,6 @@
 PassRefPtr<Image> ImageBuffer::copyImage(BackingStoreCopy copyBehavior) const
 {
     ASSERT(copyBehavior == CopyBackingStore);
-    m_context->platformContext()->makeGrContextCurrent();
     return BitmapImageSingleFrameSkia::create(*m_data.m_platformContext.bitmap(), true);
 }
 
@@ -154,14 +148,6 @@
 void ImageBuffer::draw(GraphicsContext* context, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect,
                        CompositeOperator op, bool useLowQualityScale)
 {
-    // Set both graphics contexts current. This looks a little weird, but is
-    // necessary since we may be drawing from an accelerated to
-    // non-accelerated context (e.g., printing), or vice versa. Note that it
-    // only works because the context is actually the same underlying context
-    // (or null), since we use one context for accelerated drawing. If that
-    // assumption changes, we'll have to revisit this code.
-    context->platformContext()->makeGrContextCurrent();
-    m_context->platformContext()->makeGrContextCurrent();
     RefPtr<Image> image = BitmapImageSingleFrameSkia::create(*m_data.m_platformContext.bitmap(), context == m_context);
     context->drawImage(image.get(), styleColorSpace, destRect, srcRect, op, useLowQualityScale);
 }
@@ -169,7 +155,6 @@
 void ImageBuffer::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform,
                               const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect)
 {
-    context->platformContext()->makeGrContextCurrent();
     RefPtr<Image> image = BitmapImageSingleFrameSkia::create(*m_data.m_platformContext.bitmap(), context == m_context);
     image->drawPattern(context, srcRect, patternTransform, phase, styleColorSpace, op, destRect);
 }
@@ -286,13 +271,11 @@
 
 PassRefPtr<ByteArray> ImageBuffer::getUnmultipliedImageData(const IntRect& rect) const
 {
-    m_context->platformContext()->makeGrContextCurrent();
     return getImageData<Unmultiplied>(rect, *context()->platformContext()->canvas()->getDevice(), m_size);
 }
 
 PassRefPtr<ByteArray> ImageBuffer::getPremultipliedImageData(const IntRect& rect) const
 {
-    m_context->platformContext()->makeGrContextCurrent();
     return getImageData<Premultiplied>(rect, *context()->platformContext()->canvas()->getDevice(), m_size);
 }
 
@@ -367,13 +350,11 @@
 
 void ImageBuffer::putUnmultipliedImageData(ByteArray* source, const IntSize& sourceSize, const IntRect& sourceRect, const IntPoint& destPoint)
 {
-    m_context->platformContext()->makeGrContextCurrent();
     putImageData<Unmultiplied>(source, sourceSize, sourceRect, destPoint, context()->platformContext()->canvas()->getDevice(), m_size);
 }
 
 void ImageBuffer::putPremultipliedImageData(ByteArray* source, const IntSize& sourceSize, const IntRect& sourceRect, const IntPoint& destPoint)
 {
-    m_context->platformContext()->makeGrContextCurrent();
     putImageData<Premultiplied>(source, sourceSize, sourceRect, destPoint, context()->platformContext()->canvas()->getDevice(), m_size);
 }
 
@@ -403,7 +384,6 @@
 
 String ImageBuffer::toDataURL(const String& mimeType, const double* quality) const
 {
-    m_context->platformContext()->makeGrContextCurrent();
     SkDevice* device = context()->platformContext()->canvas()->getDevice();
     return ImageToDataURL(device->accessBitmap(false), mimeType, quality);
 }

Modified: trunk/Source/WebCore/platform/graphics/skia/ImageSkia.cpp (95191 => 95192)


--- trunk/Source/WebCore/platform/graphics/skia/ImageSkia.cpp	2011-09-15 14:42:33 UTC (rev 95191)
+++ trunk/Source/WebCore/platform/graphics/skia/ImageSkia.cpp	2011-09-15 15:13:15 UTC (rev 95192)
@@ -422,8 +422,6 @@
     if (normSrcRect.isEmpty() || normDstRect.isEmpty())
         return;  // Nothing to draw.
 
-    ctxt->platformContext()->makeGrContextCurrent();
-
     paintSkBitmap(ctxt->platformContext(),
                   *bm,
                   enclosingIntRect(normSrcRect),
@@ -448,8 +446,6 @@
     if (normSrcRect.isEmpty() || normDstRect.isEmpty())
         return;  // Nothing to draw.
 
-    ctxt->platformContext()->makeGrContextCurrent();
-
     paintSkBitmap(ctxt->platformContext(),
                   m_nativeImage,
                   enclosingIntRect(normSrcRect),

Modified: trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp (95191 => 95192)


--- trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp	2011-09-15 14:42:33 UTC (rev 95191)
+++ trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.cpp	2011-09-15 15:13:15 UTC (rev 95192)
@@ -267,7 +267,6 @@
 
 void PlatformContextSkia::clipPathAntiAliased(const SkPath& clipPath)
 {
-    makeGrContextCurrent();
     if (m_canvas->getTopDevice()->getDeviceCapabilities() & SkDevice::kVector_Capability) {
         // When the output is a vector device, like PDF, we don't need antialiased clips.
         // It's up to the PDF rendering engine to do that. We can simply disable the
@@ -656,10 +655,4 @@
     m_gpuContext = context;
 }
 
-void PlatformContextSkia::makeGrContextCurrent()
-{
-    if (m_gpuContext)
-        m_gpuContext->makeContextCurrent();
-}
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.h (95191 => 95192)


--- trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.h	2011-09-15 14:42:33 UTC (rev 95191)
+++ trunk/Source/WebCore/platform/graphics/skia/PlatformContextSkia.h	2011-09-15 15:13:15 UTC (rev 95192)
@@ -174,7 +174,6 @@
 
     bool isAccelerated() const { return m_gpuContext; }
     void setGraphicsContext3D(GraphicsContext3D*);
-    void makeGrContextCurrent();
 
 private:
     // Used when restoring and the state has an image clip. Only shows the pixels in

Modified: trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.cpp (95191 => 95192)


--- trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.cpp	2011-09-15 14:42:33 UTC (rev 95191)
+++ trunk/Source/WebCore/platform/graphics/skia/SkiaFontWin.cpp	2011-09-15 15:13:15 UTC (rev 95192)
@@ -183,9 +183,6 @@
     SkCanvas* canvas = platformContext->canvas();
     TextDrawingModeFlags textMode = platformContext->getTextDrawingMode();
 
-    // If platformContext is GPU-backed make its GL context current.
-    platformContext->makeGrContextCurrent();
-
     // Filling (if necessary). This is the common case.
     SkPaint paint;
     platformContext->setupPaintForFilling(&paint);

Modified: trunk/Source/WebKit/chromium/ChangeLog (95191 => 95192)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-09-15 14:42:33 UTC (rev 95191)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-09-15 15:13:15 UTC (rev 95192)
@@ -1,3 +1,20 @@
+2011-09-15  Brian Salomon  <bsalo...@google.com>
+
+        [Skia/Chrome] 
+        https://bugs.webkit.org/show_bug.cgi?id=68096
+
+        This change removes WebGraphicsContext3D::grGLInterface(). It has been
+        superceded by WebGraphicsContext3D::createGrGLInterface which sets up
+        the per-GL call callback used to set the correct context.
+
+        Reviewed by Stephen White.
+
+        * public/WebGraphicsContext3D.h:
+        * src/GraphicsContext3DChromium.cpp:
+        (WebCore::GraphicsContext3DPrivate::grContext):
+        * src/WebGraphicsContext3D.cpp:
+        (WebKit::WebGraphicsContext3D::createGrGLInterface):
+
 2011-09-15  Xianzhu Wang  <wangxian...@chromium.org>
 
         Let TestWebKitAPI work for chromium

Modified: trunk/Source/WebKit/chromium/public/WebGraphicsContext3D.h (95191 => 95192)


--- trunk/Source/WebKit/chromium/public/WebGraphicsContext3D.h	2011-09-15 14:42:33 UTC (rev 95191)
+++ trunk/Source/WebKit/chromium/public/WebGraphicsContext3D.h	2011-09-15 15:13:15 UTC (rev 95192)
@@ -366,9 +366,6 @@
     virtual WGC3Denum getGraphicsResetStatusARB() { return 0; /* GL_NO_ERROR */ }
 
 #if WEBKIT_USING_SKIA
-    // FIXME: This function is superceded by onCreateGrGLInterface. It should be removed after subclass implementations are removed from Chromium.
-    virtual GrGLInterface* grGLInterface() { return 0; }
-
     GrGLInterface* createGrGLInterface();
 #endif
 

Modified: trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp (95191 => 95192)


--- trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp	2011-09-15 14:42:33 UTC (rev 95191)
+++ trunk/Source/WebKit/chromium/src/GraphicsContext3DChromium.cpp	2011-09-15 15:13:15 UTC (rev 95192)
@@ -202,15 +202,6 @@
 
     if (!m_grContext) {
         SkAutoTUnref<GrGLInterface> interface(m_impl->createGrGLInterface());
-        // FIXME: Remove this block after the WebGraphicsContext3D subclasses in Chromium no longer override grGLInterface().
-        if (!interface.get()) {
-            GrGLInterface* fallbackInterface = m_impl->grGLInterface();
-            if (fallbackInterface) {
-                fallbackInterface->ref(); // balance out the SkAutoTUnref
-                interface.reset(fallbackInterface);
-            }
-        }
-        // This is the end of the block to remove.
         m_grContext = GrContext::Create(kOpenGL_Shaders_GrEngine, reinterpret_cast<GrPlatform3DContext>(interface.get()));
         if (m_grContext)
             m_grContext->setTextureCacheLimits(maxTextureCacheCount, maxTextureCacheBytes);

Modified: trunk/Source/WebKit/chromium/src/WebGraphicsContext3D.cpp (95191 => 95192)


--- trunk/Source/WebKit/chromium/src/WebGraphicsContext3D.cpp	2011-09-15 14:42:33 UTC (rev 95191)
+++ trunk/Source/WebKit/chromium/src/WebGraphicsContext3D.cpp	2011-09-15 15:13:15 UTC (rev 95192)
@@ -32,24 +32,20 @@
 
 #if WEBKIT_USING_SKIA
 
-#if GR_GL_PER_GL_FUNC_CALLBACK
 namespace {
     void bindWebGraphicsContext3DGLContextCallback(const GrGLInterface* interface)
     {
         reinterpret_cast<WebGraphicsContext3D*>(interface->fCallbackData)->makeContextCurrent();
     }
 }
-#endif
 
 GrGLInterface* WebGraphicsContext3D::createGrGLInterface()
 {
     GrGLInterface* interface = onCreateGrGLInterface();
-#if GR_GL_PER_GL_FUNC_CALLBACK
     if (interface) {
         interface->fCallback = bindWebGraphicsContext3DGLContextCallback;
         interface->fCallbackData = reinterpret_cast<GrGLInterfaceCallbackData>(this);
     }
-#endif
     return interface;
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to