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

Unified Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 2660393002: Use gfx::ColorSpace instead of SkColorSpace in Blink (Closed)
Patch Set: Rebase (again) Created 3 years, 10 months 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
Index: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
index d5c5c4cfc26d090ee53cf8a7c20000661f6224c6..e41d489edeb56990f82806cd01077852fbf824eb 100644
--- a/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp
@@ -899,7 +899,8 @@ HTMLCanvasElement::createWebGLImageBufferSurface(OpacityMode opacityMode) {
// then make a non-accelerated ImageBuffer. This means copying the internal
// Image will require a pixel readback, but that is unavoidable in this case.
auto surface = WTF::wrapUnique(new AcceleratedImageBufferSurface(
- size(), opacityMode, m_context->skColorSpace(), m_context->colorType()));
+ size(), opacityMode, m_context->skSurfaceColorSpace(),
+ m_context->colorType()));
if (surface->isValid())
return std::move(surface);
return nullptr;
@@ -930,8 +931,8 @@ HTMLCanvasElement::createAcceleratedImageBufferSurface(
std::unique_ptr<ImageBufferSurface> surface =
WTF::wrapUnique(new Canvas2DImageBufferSurface(
std::move(contextProvider), size(), *msaaSampleCount, opacityMode,
- Canvas2DLayerBridge::EnableAcceleration, m_context->skColorSpace(),
- m_context->colorType()));
+ Canvas2DLayerBridge::EnableAcceleration, m_context->gfxColorSpace(),
+ m_context->skSurfacesUseColorSpace(), m_context->colorType()));
if (!surface->isValid()) {
CanvasMetrics::countCanvasContextUsage(
CanvasMetrics::GPUAccelerated2DCanvasImageBufferCreationFailed);
@@ -949,7 +950,7 @@ HTMLCanvasElement::createUnacceleratedImageBufferSurface(
if (shouldUseDisplayList()) {
auto surface = WTF::wrapUnique(new RecordingImageBufferSurface(
size(), WTF::wrapUnique(new UnacceleratedSurfaceFactory), opacityMode,
- m_context->skColorSpace(), m_context->colorType()));
+ m_context->skSurfaceColorSpace(), m_context->colorType()));
if (surface->isValid()) {
CanvasMetrics::countCanvasContextUsage(
CanvasMetrics::DisplayList2DCanvasImageBufferCreated);
@@ -960,8 +961,9 @@ HTMLCanvasElement::createUnacceleratedImageBufferSurface(
}
auto surfaceFactory = WTF::makeUnique<UnacceleratedSurfaceFactory>();
- auto surface = surfaceFactory->createSurface(
- size(), opacityMode, m_context->skColorSpace(), m_context->colorType());
+ auto surface = surfaceFactory->createSurface(size(), opacityMode,
+ m_context->skSurfaceColorSpace(),
+ m_context->colorType());
if (surface->isValid()) {
CanvasMetrics::countCanvasContextUsage(
CanvasMetrics::Unaccelerated2DCanvasImageBufferCreated);
« no previous file with comments | « third_party/WebKit/Source/core/frame/ImageBitmapTest.cpp ('k') | third_party/WebKit/Source/core/html/ImageData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698