The CopyToWebGLTexture histogram bucket is misused in the code, and HTMLCanvasElement::copiedImage can be used for many purposes, so we should take a SnapshotReason argument there so the metrics can differentiate use cases.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/774cb99b4af46bdd0954d13d44de66a8c19cd640 commit 774cb99b4af46bdd0954d13d44de66a8c19cd640 Author: junov <junov@chromium.org> Date: Sat Dec 10 01:51:12 2016 Improve metrics for display list canvas fallback reason This change removes the CopyToWebGLTexture fallback reason, which was no longer capturing the right thing, and replaces it with more granular fallback reasons for the different variants of texImage. This CL also adds more specific fallback reasons to track cases where a canvas is copied to the clipboard and createImageBItmap. BUG= 671637 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2557783002 Cr-Commit-Position: refs/heads/master@{#437714} [modify] https://crrev.com/774cb99b4af46bdd0954d13d44de66a8c19cd640/third_party/WebKit/Source/core/editing/Editor.cpp [modify] https://crrev.com/774cb99b4af46bdd0954d13d44de66a8c19cd640/third_party/WebKit/Source/core/frame/ImageBitmap.cpp [modify] https://crrev.com/774cb99b4af46bdd0954d13d44de66a8c19cd640/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp [modify] https://crrev.com/774cb99b4af46bdd0954d13d44de66a8c19cd640/third_party/WebKit/Source/core/html/HTMLCanvasElement.h [modify] https://crrev.com/774cb99b4af46bdd0954d13d44de66a8c19cd640/third_party/WebKit/Source/core/html/HTMLImageElement.cpp [modify] https://crrev.com/774cb99b4af46bdd0954d13d44de66a8c19cd640/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp [modify] https://crrev.com/774cb99b4af46bdd0954d13d44de66a8c19cd640/third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.h [modify] https://crrev.com/774cb99b4af46bdd0954d13d44de66a8c19cd640/third_party/WebKit/Source/platform/graphics/GraphicsTypes.h [modify] https://crrev.com/774cb99b4af46bdd0954d13d44de66a8c19cd640/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp [modify] https://crrev.com/774cb99b4af46bdd0954d13d44de66a8c19cd640/third_party/WebKit/Source/platform/graphics/ImageBuffer.h [modify] https://crrev.com/774cb99b4af46bdd0954d13d44de66a8c19cd640/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.cpp [modify] https://crrev.com/774cb99b4af46bdd0954d13d44de66a8c19cd640/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurface.h [modify] https://crrev.com/774cb99b4af46bdd0954d13d44de66a8c19cd640/tools/metrics/histograms/histograms.xml
Comment 1 by junov@chromium.org
, Dec 6 2016