diff options
Diffstat (limited to 'Source/WebCore/platform/graphics/android/context/GraphicsContextAndroid.cpp')
-rw-r--r-- | Source/WebCore/platform/graphics/android/context/GraphicsContextAndroid.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/GraphicsContextAndroid.cpp b/Source/WebCore/platform/graphics/android/context/GraphicsContextAndroid.cpp index 3b93d51..23b22e6 100644 --- a/Source/WebCore/platform/graphics/android/context/GraphicsContextAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/context/GraphicsContextAndroid.cpp @@ -46,7 +46,6 @@ #include "SkString.h" #include "SkiaUtils.h" #include "TransformationMatrix.h" -#include "android_graphics.h" using namespace std; @@ -110,7 +109,7 @@ GraphicsContext* GraphicsContext::createOffscreenContext(int width, int height) bitmap.setConfig(SkBitmap::kARGB_8888_Config, width, height); bitmap.allocPixels(); bitmap.eraseColor(0); - pgc->getCanvas()->setBitmapDevice(bitmap); + pgc->canvas()->setBitmapDevice(bitmap); GraphicsContext* ctx = new GraphicsContext(pgc); return ctx; @@ -511,6 +510,8 @@ void GraphicsContext::translate(float x, float y) { if (paintingDisabled()) return; + if (!x && !y) + return; platformContext()->translate(x, y); } @@ -660,10 +661,3 @@ void GraphicsContext::drawHighlightForText(const Font& font, const TextRun& run, } } // namespace WebCore - -/////////////////////////////////////////////////////////////////////////////// - -SkCanvas* android_gc2canvas(WebCore::GraphicsContext* gc) -{ - return gc->platformContext()->getCanvas(); -} |