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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp

Issue 2472783002: Disable display list for 2D canvas when the canvas is color managed (Closed)
Patch Set: Addressing comments. Created 4 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 unified diff | Download patch
« no previous file with comments | « content/test/gpu/gpu_tests/pixel_expectations.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 sk_sp<SkColorSpace> colorSpace, 850 sk_sp<SkColorSpace> colorSpace,
851 SkColorType colorType) { 851 SkColorType colorType) {
852 return wrapUnique(new UnacceleratedImageBufferSurface( 852 return wrapUnique(new UnacceleratedImageBufferSurface(
853 size, opacityMode, InitializeImagePixels, colorSpace, colorType)); 853 size, opacityMode, InitializeImagePixels, colorSpace, colorType));
854 } 854 }
855 855
856 virtual ~UnacceleratedSurfaceFactory() {} 856 virtual ~UnacceleratedSurfaceFactory() {}
857 }; 857 };
858 858
859 bool HTMLCanvasElement::shouldUseDisplayList(const IntSize& deviceSize) { 859 bool HTMLCanvasElement::shouldUseDisplayList(const IntSize& deviceSize) {
860 if (m_context->colorSpace() != kLegacyCanvasColorSpace)
861 return false;
862
860 if (RuntimeEnabledFeatures::forceDisplayList2dCanvasEnabled()) 863 if (RuntimeEnabledFeatures::forceDisplayList2dCanvasEnabled())
861 return true; 864 return true;
862 865
863 if (!RuntimeEnabledFeatures::displayList2dCanvasEnabled()) 866 if (!RuntimeEnabledFeatures::displayList2dCanvasEnabled())
864 return false; 867 return false;
865 868
866 return true; 869 return true;
867 } 870 }
868 871
869 std::unique_ptr<ImageBufferSurface> 872 std::unique_ptr<ImageBufferSurface>
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 mojom::blink::OffscreenCanvasSurfacePtr service; 1357 mojom::blink::OffscreenCanvasSurfacePtr service;
1355 Platform::current()->interfaceProvider()->getInterface( 1358 Platform::current()->interfaceProvider()->getInterface(
1356 mojo::GetProxy(&service)); 1359 mojo::GetProxy(&service));
1357 m_surfaceLayerBridge = 1360 m_surfaceLayerBridge =
1358 wrapUnique(new CanvasSurfaceLayerBridge(std::move(service))); 1361 wrapUnique(new CanvasSurfaceLayerBridge(std::move(service)));
1359 return m_surfaceLayerBridge->createSurfaceLayer(this->width(), 1362 return m_surfaceLayerBridge->createSurfaceLayer(this->width(),
1360 this->height()); 1363 this->height());
1361 } 1364 }
1362 1365
1363 } // namespace blink 1366 } // namespace blink
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/pixel_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698