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

morrita at google.com morrita at google.com
Wed Dec 22 13:59:53 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1baaf869ac59119c5ffaea7c7f439017e30e923f
Author: morrita at google.com <morrita at google.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Oct 1 05:58:36 2010 +0000

    2010-09-30  MORITA Hajime  <morrita at google.com>
    
            Reviewed by James Robinson.
    
            [Chromium] build fails unless ACCELERATED_2D_CANVAS defined
            https://bugs.webkit.org/show_bug.cgi?id=46955
    
            Added ifdef guard around SharedGraphicsContext3D.
    
            No new tests. just a build fix.
    
            * platform/graphics/skia/PlatformContextSkia.cpp:
            (WebCore::PlatformContextSkia::~PlatformContextSkia):
            (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
            (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
            (WebCore::PlatformContextSkia::readbackHardwareToSoftware):
            * platform/graphics/skia/PlatformContextSkia.h:
            (WebCore::PlatformContextSkia::gpuCanvas):
    2010-09-30  MORITA Hajime  <morrita at google.com>
    
            Reviewed by James Robinson.
    
            [Chromium] build fails unless ACCELERATED_2D_CANVAS defined
            https://bugs.webkit.org/show_bug.cgi?id=46955
    
            Added ifdef guard around SharedGraphicsContext3D.
    
            * src/WebViewImpl.cpp:
            (WebKit::WebViewImpl::getSharedGraphicsContext3D):
            * src/WebViewImpl.h:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68865 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 677874f..0e4f66b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2010-09-30  MORITA Hajime  <morrita at google.com>
+
+        Reviewed by James Robinson.
+
+        [Chromium] build fails unless ACCELERATED_2D_CANVAS defined
+        https://bugs.webkit.org/show_bug.cgi?id=46955
+        
+        Added ifdef guard around SharedGraphicsContext3D.
+
+        No new tests. just a build fix.
+
+        * platform/graphics/skia/PlatformContextSkia.cpp:
+        (WebCore::PlatformContextSkia::~PlatformContextSkia):
+        (WebCore::PlatformContextSkia::setSharedGraphicsContext3D):
+        (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
+        (WebCore::PlatformContextSkia::readbackHardwareToSoftware):
+        * platform/graphics/skia/PlatformContextSkia.h:
+        (WebCore::PlatformContextSkia::gpuCanvas):
+
 2010-09-30  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Chris Fleizach.
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
index b469312..887314f 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
@@ -34,12 +34,10 @@
 
 #include "AffineTransform.h"
 #include "DrawingBuffer.h"
-#include "GLES2Canvas.h"
 #include "GraphicsContext.h"
 #include "GraphicsContext3D.h"
 #include "ImageBuffer.h"
 #include "NativeImageSkia.h"
-#include "SharedGraphicsContext3D.h"
 #include "SkiaUtils.h"
 #include "Texture.h"
 #include "TilingData.h"
@@ -56,6 +54,11 @@
 #include <wtf/OwnArrayPtr.h>
 #include <wtf/Vector.h>
 
+#if ENABLE(ACCELERATED_2D_CANVAS)
+#include "GLES2Canvas.h"
+#include "SharedGraphicsContext3D.h"
+#endif
+
 namespace WebCore {
 
 extern bool isPathSkiaSafe(const SkMatrix& transform, const SkPath& path);
@@ -216,8 +219,10 @@ PlatformContextSkia::PlatformContextSkia(skia::PlatformCanvas* canvas)
 
 PlatformContextSkia::~PlatformContextSkia()
 {
+#if ENABLE(ACCELERATED_2D_CANVAS)
     if (m_gpuCanvas)
         m_gpuCanvas->drawingBuffer()->setWillPublishCallback(0);
+#endif
 }
 
 void PlatformContextSkia::setCanvas(skia::PlatformCanvas* canvas)
@@ -705,6 +710,7 @@ private:
 
 void PlatformContextSkia::setSharedGraphicsContext3D(SharedGraphicsContext3D* context, DrawingBuffer* drawingBuffer, const WebCore::IntSize& size)
 {
+#if ENABLE(ACCELERATED_2D_CANVAS)
     if (context && drawingBuffer) {
         m_useGPU = true;
         m_gpuCanvas = new GLES2Canvas(context, drawingBuffer, size);
@@ -716,6 +722,7 @@ void PlatformContextSkia::setSharedGraphicsContext3D(SharedGraphicsContext3D* co
         m_gpuCanvas.clear();
         m_useGPU = false;
     }
+#endif
 }
 
 void PlatformContextSkia::prepareForSoftwareDraw() const
@@ -808,6 +815,7 @@ void PlatformContextSkia::markDirtyRect(const IntRect& rect)
 
 void PlatformContextSkia::uploadSoftwareToHardware(CompositeOperator op) const
 {
+#if ENABLE(ACCELERATED_2D_CANVAS)
     const SkBitmap& bitmap = m_canvas->getDevice()->accessBitmap(false);
     SkAutoLockPixels lock(bitmap);
     SharedGraphicsContext3D* context = m_gpuCanvas->context();
@@ -825,10 +833,12 @@ void PlatformContextSkia::uploadSoftwareToHardware(CompositeOperator op) const
     m_canvas->drawARGB(0, 0, 0, 0, SkXfermode::kClear_Mode);
     m_canvas->restore();
     m_softwareDirtyRect.setWidth(0); // Clear dirty rect.
+#endif
 }
 
 void PlatformContextSkia::readbackHardwareToSoftware() const
 {
+#if ENABLE(ACCELERATED_2D_CANVAS)
     const SkBitmap& bitmap = m_canvas->getDevice()->accessBitmap(true);
     SkAutoLockPixels lock(bitmap);
     int width = bitmap.width(), height = bitmap.height();
@@ -850,6 +860,7 @@ void PlatformContextSkia::readbackHardwareToSoftware() const
         }
     }
     m_softwareDirtyRect.unite(IntRect(0, 0, width, height)); // Mark everything as dirty.
+#endif
 }
 
 } // namespace WebCore
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.h b/WebCore/platform/graphics/skia/PlatformContextSkia.h
index eb03224..71d96c2 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.h
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.h
@@ -183,8 +183,11 @@ public:
     bool canvasClipApplied() const;
     bool useGPU() { return m_useGPU; }
     void setSharedGraphicsContext3D(SharedGraphicsContext3D*, DrawingBuffer*, const IntSize&);
+#if ENABLE(ACCELERATED_2D_CANVAS)
     GLES2Canvas* gpuCanvas() const { return m_gpuCanvas.get(); }
-
+#else
+    GLES2Canvas* gpuCanvas() const { return 0; }
+#endif
     // Call these before making a call that manipulates the underlying
     // skia::PlatformCanvas or WebCore::GLES2Canvas
     void prepareForSoftwareDraw() const;
@@ -224,7 +227,9 @@ private:
     FloatSize m_imageResamplingHintDstSize;
     bool m_drawingToImageBuffer;
     bool m_useGPU;
+#if ENABLE(ACCELERATED_2D_CANVAS)
     OwnPtr<GLES2Canvas> m_gpuCanvas;
+#endif
     mutable enum { None, Software, Mixed, Hardware } m_backingStoreState;
     mutable RefPtr<Texture> m_uploadTexture;
     mutable IntRect m_softwareDirtyRect;
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 685ac20..7e222c9 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,16 @@
+2010-09-30  MORITA Hajime  <morrita at google.com>
+
+        Reviewed by James Robinson.
+
+        [Chromium] build fails unless ACCELERATED_2D_CANVAS defined
+        https://bugs.webkit.org/show_bug.cgi?id=46955
+        
+        Added ifdef guard around SharedGraphicsContext3D.
+
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::getSharedGraphicsContext3D):
+        * src/WebViewImpl.h:
+
 2010-09-30  Alexey Marinichev  <amarinichev at chromium.org>
 
         Reviewed by Chris Marrin.
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index b415bf8..fd7dd3a 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -88,7 +88,6 @@
 #include "SecurityOrigin.h"
 #include "SelectionController.h"
 #include "Settings.h"
-#include "SharedGraphicsContext3D.h"
 #include "Timer.h"
 #include "TypingCommand.h"
 #include "UserGestureIndicator.h"
@@ -131,6 +130,10 @@
 #include "RenderTheme.h"
 #endif
 
+#if ENABLE(ACCELERATED_2D_CANVAS)
+#include "SharedGraphicsContext3D.h"
+#endif
+
 // Get rid of WTF's pow define so we can use std::pow.
 #undef pow
 #include <cmath> // for std::pow
@@ -2425,6 +2428,7 @@ void WebViewImpl::doComposite()
 
 SharedGraphicsContext3D* WebViewImpl::getSharedGraphicsContext3D()
 {
+#if ENABLE(ACCELERATED_2D_CANVAS)
     if (!m_sharedContext3D) {
         GraphicsContext3D::Attributes attr;
         OwnPtr<GraphicsContext3D> context = GraphicsContext3D::create(attr, m_page->chrome());
@@ -2434,6 +2438,9 @@ SharedGraphicsContext3D* WebViewImpl::getSharedGraphicsContext3D()
     }
 
     return m_sharedContext3D.get();
+#else
+    return 0;
+#endif
 }
 
 WebGraphicsContext3D* WebViewImpl::graphicsContext3D()
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index 9db914d..9c21e49 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -538,8 +538,9 @@ private:
     // early. This member holds on to the GC3D in this case.
     OwnPtr<WebCore::GraphicsContext3D> m_temporaryOnscreenGraphicsContext3D;
 
+#if ENABLE(ACCELERATED_2D_CANVAS)
     RefPtr<WebCore::SharedGraphicsContext3D> m_sharedContext3D;
-
+#endif
     OwnPtr<DeviceOrientationClientProxy> m_deviceOrientationClientProxy;
 };
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list