| Index: third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
|
| index 32204cf95bc0171c5e8dd8cb31b6f30b823703c3..d1a6788683b9f14cc147e7f022fe7d9661fd5c23 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/OffscreenCanvasFrameDispatcherImpl.cpp
|
| @@ -12,9 +12,8 @@
|
| #include "cc/quads/texture_draw_quad.h"
|
| #include "cc/resources/returned_resource.h"
|
| #include "gpu/command_buffer/client/gles2_interface.h"
|
| -#include "platform/RuntimeEnabledFeatures.h"
|
| +#include "platform/Histogram.h"
|
| #include "platform/graphics/gpu/SharedGpuContext.h"
|
| -#include "platform/RuntimeEnabledFeatures.h"
|
| #include "public/platform/InterfaceProvider.h"
|
| #include "public/platform/Platform.h"
|
| #include "public/platform/WebGraphicsContext3DProvider.h"
|
| @@ -188,18 +187,27 @@ void OffscreenCanvasFrameDispatcherImpl::dispatchFrame(
|
| // TODO(crbug.com/646022): making this overlay-able.
|
| resource.is_overlay_candidate = false;
|
|
|
| + DEFINE_THREAD_SAFE_STATIC_LOCAL(
|
| + EnumerationHistogram, commitTypeHistogram,
|
| + new EnumerationHistogram("OffscreenCanvas.CommitType",
|
| + OffscreenCanvasCommitTypeCount));
|
| if (!image->isTextureBacked() &&
|
| - !Platform::current()->isGPUCompositingEnabled())
|
| + !Platform::current()->isGPUCompositingEnabled()) {
|
| + commitTypeHistogram.count(CommitSoftwareCanvasSoftwareCompositing);
|
| setTransferableResourceInMemory(resource, image);
|
| - else if (!image->isTextureBacked() &&
|
| - Platform::current()->isGPUCompositingEnabled())
|
| + } else if (!image->isTextureBacked() &&
|
| + Platform::current()->isGPUCompositingEnabled()) {
|
| + commitTypeHistogram.count(CommitSoftwareCanvasGPUCompositing);
|
| setTransferableResourceMemoryToTexture(resource, image);
|
| - else if (image->isTextureBacked() &&
|
| - (!Platform::current()->isGPUCompositingEnabled() ||
|
| - isWebGLSoftwareRendering))
|
| + } else if (image->isTextureBacked() &&
|
| + (!Platform::current()->isGPUCompositingEnabled() ||
|
| + isWebGLSoftwareRendering)) {
|
| + commitTypeHistogram.count(CommitGPUCanvasSoftwareCompositing);
|
| setTransferableResourceInMemory(resource, image);
|
| - else
|
| + } else {
|
| + commitTypeHistogram.count(CommitGPUCanvasGPUCompositing);
|
| setTransferableResourceInTexture(resource, image);
|
| + }
|
|
|
| m_nextResourceId++;
|
| frame.delegated_frame_data->resource_list.push_back(std::move(resource));
|
|
|