Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1225)

Unified Diff: Source/core/platform/graphics/GraphicsContext3DImagePacking.cpp

Issue 54653004: Break dependency of platform/graphics on html/ImageData.h (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move struct into ImageBuffer.h Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/platform/graphics/GraphicsContext3D.cpp ('k') | Source/core/platform/graphics/ImageBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/platform/graphics/GraphicsContext3DImagePacking.cpp
diff --git a/Source/core/platform/graphics/GraphicsContext3DImagePacking.cpp b/Source/core/platform/graphics/GraphicsContext3DImagePacking.cpp
index a75308c58083846a2ce5b6374e9d42928740c341..a1afff763381b202f2ef34c8f534278877fb8614 100644
--- a/Source/core/platform/graphics/GraphicsContext3DImagePacking.cpp
+++ b/Source/core/platform/graphics/GraphicsContext3DImagePacking.cpp
@@ -27,7 +27,6 @@
#include "config.h"
#include "core/platform/graphics/GraphicsContext3D.h"
-#include "core/html/ImageData.h"
#include "core/platform/graphics/ImageObserver.h"
#include "core/platform/graphics/cpu/arm/GraphicsContext3DNEON.h"
#include "core/platform/image-decoders/ImageDecoder.h"
@@ -1490,7 +1489,8 @@ bool GraphicsContext3D::packImageData(
}
bool GraphicsContext3D::extractImageData(
- ImageData* imageData,
+ const uint8_t* imageData,
+ const IntSize& imageDataSize,
GC3Denum format,
GC3Denum type,
bool flipY,
@@ -1499,8 +1499,8 @@ bool GraphicsContext3D::extractImageData(
{
if (!imageData)
return false;
- int width = imageData->width();
- int height = imageData->height();
+ int width = imageDataSize.width();
+ int height = imageDataSize.height();
unsigned packedSize;
// Output data is tightly packed (alignment == 1).
@@ -1508,7 +1508,7 @@ bool GraphicsContext3D::extractImageData(
return false;
data.resize(packedSize);
- if (!packPixels(imageData->data()->data(), DataFormatRGBA8, width, height, 0, format, type, premultiplyAlpha ? AlphaDoPremultiply : AlphaDoNothing, data.data(), flipY))
+ if (!packPixels(imageData, DataFormatRGBA8, width, height, 0, format, type, premultiplyAlpha ? AlphaDoPremultiply : AlphaDoNothing, data.data(), flipY))
return false;
return true;
« no previous file with comments | « Source/core/platform/graphics/GraphicsContext3D.cpp ('k') | Source/core/platform/graphics/ImageBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698