Commit 14cf0e32 authored by Jonathan Backer's avatar Jonathan Backer Committed by Commit Bot

--enable-gpu-service-logging for DirectContextProvider

This plumbs useful debug flag down.

Bug: 908957
Change-Id: I2f1777f850cc9f485698233a615b226c95502ce7
Reviewed-on: https://chromium-review.googlesource.com/c/1492486
Commit-Queue: Jonathan Backer <backer@chromium.org>
Reviewed-by: default avatarPeng Huang <penghuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636434}
parent 41823ca4
......@@ -51,6 +51,9 @@ DirectContextProvider::DirectContextProvider(
command_buffer->service(), &outputter_,
group.get()));
if (gpu_preferences.enable_gpu_service_logging)
decoder->SetLogCommands(true);
command_buffer->set_handler(decoder.get());
gpu::ContextCreationAttribs attribs;
......@@ -100,6 +103,10 @@ DirectContextProvider::DirectContextProvider(
base::trace_event::MemoryDumpManager::GetInstance()->RegisterDumpProvider(
this, "viz::DirectContextProvider", base::ThreadTaskRunnerHandle::Get());
// TraceEndCHROMIUM is implicit when the context is destroyed
gles2_implementation_->TraceBeginCHROMIUM("VizCompositor",
"DisplayCompositor");
}
DirectContextProvider::~DirectContextProvider() {
......
......@@ -7,6 +7,7 @@
#include "base/atomic_sequence_num.h"
#include "base/bind.h"
#include "base/callback_helpers.h"
#include "base/command_line.h"
#include "base/optional.h"
#include "base/synchronization/waitable_event.h"
#include "components/viz/common/frame_sinks/copy_output_request.h"
......@@ -22,6 +23,7 @@
#include "gpu/command_buffer/service/gr_shader_cache.h"
#include "gpu/command_buffer/service/mailbox_manager.h"
#include "gpu/command_buffer/service/scheduler.h"
#include "gpu/command_buffer/service/service_utils.h"
#include "gpu/command_buffer/service/shared_image_factory.h"
#include "gpu/command_buffer/service/shared_image_representation.h"
#include "gpu/command_buffer/service/skia_utils.h"
......@@ -535,6 +537,12 @@ SkiaOutputSurfaceImplOnGpu::SkiaOutputSurfaceImplOnGpu(
->GetSurfaceFactoryOzone()
->CreatePlatformWindowSurface(surface_handle);
#endif
if (gpu_service) {
gpu_preferences_ = gpu_service->gpu_channel_manager()->gpu_preferences();
} else {
auto* command_line = base::CommandLine::ForCurrentProcess();
gpu_preferences_ = gpu::gles2::ParseGpuPreferences(command_line);
}
if (is_using_vulkan())
InitializeForVulkan(gpu_service);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment