diff options
author | Derek Sollenberger <djsollen@google.com> | 2012-02-06 17:41:59 -0500 |
---|---|---|
committer | Derek Sollenberger <djsollen@google.com> | 2012-02-06 17:41:59 -0500 |
commit | faf2b5dab67cbe9c5a9244f3912e916d0184f765 (patch) | |
tree | 752c1c74fbbc2686cdb540cb8cbe0176e3da37bf /Source/WebCore/platform/graphics/android | |
parent | 97fafc16fc2fa715dd78f611c0ebe33a64e53f88 (diff) | |
parent | 6f1bf086c7d24634eb00a62d5af024bda7b06365 (diff) | |
download | external_webkit-faf2b5dab67cbe9c5a9244f3912e916d0184f765.zip external_webkit-faf2b5dab67cbe9c5a9244f3912e916d0184f765.tar.gz external_webkit-faf2b5dab67cbe9c5a9244f3912e916d0184f765.tar.bz2 |
resolved conflicts for merge of 6f1bf086 to master
Change-Id: I104f02e5e6ec50c002a2bdc960b428ece13528dd
Diffstat (limited to 'Source/WebCore/platform/graphics/android')
5 files changed, 8 insertions, 15 deletions
diff --git a/Source/WebCore/platform/graphics/android/GaneshContext.cpp b/Source/WebCore/platform/graphics/android/GaneshContext.cpp index d4fa4e7..1a5ce5e 100644 --- a/Source/WebCore/platform/graphics/android/GaneshContext.cpp +++ b/Source/WebCore/platform/graphics/android/GaneshContext.cpp @@ -187,12 +187,7 @@ SkDevice* GaneshContext::getDeviceForBaseTileSurface(const TileRenderInfo& rende GrContext* grContext = getGrContext(); GrRenderTarget* renderTarget = (GrRenderTarget*) grContext->createPlatformSurface(surfaceDesc); - SkBitmap bitmap; - bitmap.setConfig(SkBitmap::kARGB_8888_Config, - renderInfo.tileSize.width(), - renderInfo.tileSize.height()); - - m_baseTileDeviceSurface = new SkGpuDevice(grContext, bitmap, renderTarget); + m_baseTileDeviceSurface = new SkGpuDevice(grContext, renderTarget); renderTarget->unref(); XLOG("generated device %p", m_baseTileDeviceSurface); } @@ -258,11 +253,7 @@ SkDevice* GaneshContext::getDeviceForBaseTileFBO(const TileRenderInfo& renderInf GrContext* grContext = getGrContext(); GrRenderTarget* renderTarget = (GrRenderTarget*) grContext->createPlatformSurface(surfaceDesc); - SkBitmap bitmap; - bitmap.setConfig(SkBitmap::kARGB_8888_Config, - TilesManager::tileWidth(), TilesManager::tileWidth()); - - m_baseTileDeviceFBO = new SkGpuDevice(grContext, bitmap, renderTarget); + m_baseTileDeviceFBO = new SkGpuDevice(grContext, renderTarget); renderTarget->unref(); XLOG("generated device %p", m_baseTileDeviceFBO); } diff --git a/Source/WebCore/platform/graphics/android/GaneshRenderer.cpp b/Source/WebCore/platform/graphics/android/GaneshRenderer.cpp index 5889655..c90ddb3 100644 --- a/Source/WebCore/platform/graphics/android/GaneshRenderer.cpp +++ b/Source/WebCore/platform/graphics/android/GaneshRenderer.cpp @@ -113,7 +113,6 @@ void GaneshRenderer::setupCanvas(const TileRenderInfo& renderInfo, SkCanvas* can // set the GPU device to the canvas canvas->setDevice(device); - canvas->setDeviceFactory(device->getDeviceFactory()); } void GaneshRenderer::setupPartialInval(const TileRenderInfo& renderInfo, SkCanvas* canvas) diff --git a/Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp b/Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp index 439733b..f148881 100644 --- a/Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp +++ b/Source/WebCore/platform/graphics/android/ImageBufferAndroid.cpp @@ -36,6 +36,7 @@ #include "SkBitmapRef.h" #include "SkCanvas.h" #include "SkColorPriv.h" +#include "SkData.h" #include "SkDevice.h" #include "SkImageEncoder.h" #include "SkStream.h" @@ -241,7 +242,9 @@ String ImageBuffer::toDataURL(const String&, const double*) const // Convert it into base64. Vector<char> pngEncodedData; - pngEncodedData.append(pngStream.getStream(), pngStream.getOffset()); + SkData* streamData = pngStream.copyToData(); + pngEncodedData.append((char*)streamData->data(), streamData->size()); + streamData->unref(); Vector<char> base64EncodedData; base64Encode(pngEncodedData, base64EncodedData); // Append with a \0 so that it's a valid string. diff --git a/Source/WebCore/platform/graphics/android/ImageTexture.cpp b/Source/WebCore/platform/graphics/android/ImageTexture.cpp index e1b18b4..0ca8ee7 100644 --- a/Source/WebCore/platform/graphics/android/ImageTexture.cpp +++ b/Source/WebCore/platform/graphics/android/ImageTexture.cpp @@ -126,7 +126,7 @@ SkBitmap* ImageTexture::convertBitmap(SkBitmap* bitmap) // Create a copy of the image img->setConfig(SkBitmap::kARGB_8888_Config, w, h); img->allocPixels(); - SkDevice* device = new SkDevice(NULL, *img, false); + SkDevice* device = new SkDevice(*img); SkCanvas canvas; canvas.setDevice(device); device->unref(); diff --git a/Source/WebCore/platform/graphics/android/RasterRenderer.cpp b/Source/WebCore/platform/graphics/android/RasterRenderer.cpp index 4b6d2de..f52af60 100644 --- a/Source/WebCore/platform/graphics/android/RasterRenderer.cpp +++ b/Source/WebCore/platform/graphics/android/RasterRenderer.cpp @@ -101,7 +101,7 @@ void RasterRenderer::setupCanvas(const TileRenderInfo& renderInfo, SkCanvas* can g_bitmap->eraseARGB(255, 255, 255, 255); } - SkDevice* device = new SkDevice(NULL, *g_bitmap, false); + SkDevice* device = new SkDevice(*g_bitmap); if (renderInfo.measurePerf) { m_perfMon.stop(TAG_CREATE_BITMAP); |