Don't use blending in drawImage if not needed |
||
Issue descriptionIn many call sites of SkCanvas::drawImage() we create a surface and draw an image on the empty canvas. In this case, we should avoid blending by using SkBlendMode::kSrc as it results in unnecessary computing, and the overhead increases with the canvas size: https://fiddle.skia.org/c/1ec3c61ed08f7863d43b9f49ab120a0a
,
Nov 20 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ec67cae3b77ca0f9d641a2722d8d1f6090b346fd commit ec67cae3b77ca0f9d641a2722d8d1f6090b346fd Author: Reza.Zakerinasab <zakerinasab@chromium.org> Date: Mon Nov 20 17:54:39 2017 With {premultiplyAlpha: "none"} ImageBitmap should avoid premul code path When premultiplyAlpha is set to "none" in ImageBitmapOptions, we should never pass through premul format in color managed ImageBitmap code. Bug: 781908 , 785313 Change-Id: I3a2fc1664dd57530bdc31694c5f9d61e95a9501b Reviewed-on: https://chromium-review.googlesource.com/759116 Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org> Reviewed-by: Justin Novosad <junov@chromium.org> Reviewed-by: Fernando Serboncini <fserb@chromium.org> Cr-Commit-Position: refs/heads/master@{#517858} [modify] https://crrev.com/ec67cae3b77ca0f9d641a2722d8d1f6090b346fd/third_party/WebKit/Source/core/html/ImageData.cpp [modify] https://crrev.com/ec67cae3b77ca0f9d641a2722d8d1f6090b346fd/third_party/WebKit/Source/core/html/ImageData.h [modify] https://crrev.com/ec67cae3b77ca0f9d641a2722d8d1f6090b346fd/third_party/WebKit/Source/core/html/ImageDataTest.cpp [modify] https://crrev.com/ec67cae3b77ca0f9d641a2722d8d1f6090b346fd/third_party/WebKit/Source/core/imagebitmap/ImageBitmap.cpp [modify] https://crrev.com/ec67cae3b77ca0f9d641a2722d8d1f6090b346fd/third_party/WebKit/Source/core/imagebitmap/ImageBitmap.h [modify] https://crrev.com/ec67cae3b77ca0f9d641a2722d8d1f6090b346fd/third_party/WebKit/Source/modules/canvas/canvas2d/BaseRenderingContext2D.cpp
,
Nov 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5a522f9e1662c2072a3a4cc88733d287c25a7023 commit 5a522f9e1662c2072a3a4cc88733d287c25a7023 Author: Reza.Zakerinasab <zakerinasab@chromium.org> Date: Tue Nov 28 18:25:37 2017 Minor code health improvements in ImageBitmap and ImageBuffer This CL contains minor changes in ImageBitmap and ImageBuffer to: - use blending in SkCanvas::drawImage() only if needed - fix ImageBitmap->CopyImageData() behavior to match the signature - use SkImageInfo::minRowBytes() in SkImage::readPixels() call sites Bug: 785313 , 788879 , 788881 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I1473fc71ce1785f87c0f3e47441515f6cd3dd7a7 Reviewed-on: https://chromium-review.googlesource.com/793951 Commit-Queue: Mohammad Reza Zakerinasab <zakerinasab@chromium.org> Reviewed-by: Justin Novosad <junov@chromium.org> Cr-Commit-Position: refs/heads/master@{#519755} [modify] https://crrev.com/5a522f9e1662c2072a3a4cc88733d287c25a7023/third_party/WebKit/Source/core/imagebitmap/ImageBitmap.cpp [modify] https://crrev.com/5a522f9e1662c2072a3a4cc88733d287c25a7023/third_party/WebKit/Source/core/imagebitmap/ImageBitmapTest.cpp [modify] https://crrev.com/5a522f9e1662c2072a3a4cc88733d287c25a7023/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
,
Nov 28 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by zakerinasab@chromium.org
, Nov 15 2017