Commit 3ff6b565 authored by Khushal's avatar Khushal Committed by Commit Bot

Revert "gpu: Hook up activity flags for glProgramBinary for OOPR."

This reverts commit 13e510ef.

Reason for revert: Causing crashes on the latest canary. I'll debug on Monday.

Original change's description:
> gpu: Hook up activity flags for glProgramBinary for OOPR.
> 
> The activity flags are used to notify the browser if the GPU process
> crashes during shader compilation which could indicate a corrupted disk
> shader cache. Hook this up for the persistent shader caching on the
> GrContext for OOPR.
> 
> R=​ericrk@chromium.org, piman@chromium.org
> 
> Bug: 854416
> Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
> Change-Id: I4ed69d41768856b649a500dd5b86777bf0023d26
> Reviewed-on: https://chromium-review.googlesource.com/1142367
> Reviewed-by: Antoine Labour <piman@chromium.org>
> Commit-Queue: Khushal <khushalsagar@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#576819}

TBR=khushalsagar@chromium.org,piman@chromium.org,ericrk@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 854416
Change-Id: I51f5ff5b7427348b06159b7a8a3ec11161d9b6f3
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Reviewed-on: https://chromium-review.googlesource.com/1146087Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
Commit-Queue: Khushal <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/master@{#577109}
parent aeabd72a
......@@ -6,7 +6,6 @@
#include "base/threading/thread_task_runner_handle.h"
#include "base/trace_event/memory_dump_manager.h"
#include "gpu/command_buffer/common/activity_flags.h"
#include "gpu/command_buffer/service/service_transfer_cache.h"
#include "gpu/config/gpu_driver_bug_workarounds.h"
#include "ui/gl/gl_context.h"
......@@ -41,11 +40,10 @@ RasterDecoderContextState::~RasterDecoderContextState() {
void RasterDecoderContextState::InitializeGrContext(
const GpuDriverBugWorkarounds& workarounds,
GrContextOptions::PersistentCache* cache,
GpuProcessActivityFlags* activity_flags) {
GrContextOptions::PersistentCache* cache) {
DCHECK(context->IsCurrent(surface.get()));
sk_sp<GrGLInterface> interface(
sk_sp<const GrGLInterface> interface(
gl::init::CreateGrGLInterface(*context->GetVersionInfo()));
if (!interface) {
LOG(ERROR) << "OOP raster support disabled: GrGLInterface creation "
......@@ -53,18 +51,6 @@ void RasterDecoderContextState::InitializeGrContext(
return;
}
auto original_func = interface->fFunctions.fProgramBinary;
if (activity_flags && original_func && cache) {
interface->fFunctions.fProgramBinary = [&activity_flags, &original_func](
GrGLuint program,
GrGLenum binaryFormat,
void* binary, GrGLsizei length) {
GpuProcessActivityFlags::ScopedSetFlag scoped_set_flag(
activity_flags, ActivityFlagsBase::FLAG_LOADING_PROGRAM_BINARY);
return original_func(program, binaryFormat, binary, length);
};
}
// If you make any changes to the GrContext::Options here that could
// affect text rendering, make sure to match the capabilities initialized
// in GetCapabilities and ensuring these are also used by the
......
......@@ -20,7 +20,6 @@ class GLSurface;
namespace gpu {
class GpuDriverBugWorkarounds;
class GpuProcessActivityFlags;
class ServiceTransferCache;
namespace raster {
......@@ -34,8 +33,7 @@ struct GPU_GLES2_EXPORT RasterDecoderContextState
scoped_refptr<gl::GLContext> context,
bool use_virtualized_gl_contexts);
void InitializeGrContext(const GpuDriverBugWorkarounds& workarounds,
GrContextOptions::PersistentCache* cache,
GpuProcessActivityFlags* activity_flags = nullptr);
GrContextOptions::PersistentCache* cache);
void PurgeMemory(
base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level);
......
......@@ -434,7 +434,7 @@ GpuChannelManager::GetRasterDecoderContextState(ContextResult* result) {
gpu::kGpuFeatureStatusEnabled;
if (enable_raster_transport) {
raster_decoder_context_state_->InitializeGrContext(
gpu_driver_bug_workarounds_, gr_shader_cache(), &activity_flags_);
gpu_driver_bug_workarounds_, gr_shader_cache());
}
gr_cache_controller_.emplace(raster_decoder_context_state_.get(),
......
......@@ -45,7 +45,7 @@ const char* kBlacklistExtensions[] = {
} // anonymous namespace
sk_sp<GrGLInterface> CreateGrGLInterface(
sk_sp<const GrGLInterface> CreateGrGLInterface(
const gl::GLVersionInfo& version_info) {
gl::ProcsGL* gl = &gl::g_current_gl_driver->fn;
gl::GLApi* api = gl::g_current_gl_context;
......@@ -488,7 +488,7 @@ sk_sp<GrGLInterface> CreateGrGLInterface(
interface->fStandard = standard;
interface->fExtensions.swap(&extensions);
sk_sp<GrGLInterface> returned(interface);
sk_sp<const GrGLInterface> returned(interface);
return returned;
}
......
......@@ -18,7 +18,7 @@ namespace init {
// Creates a GrGLInterface by taking function pointers from the current
// GL bindings.
GL_INIT_EXPORT sk_sp<GrGLInterface> CreateGrGLInterface(
GL_INIT_EXPORT sk_sp<const GrGLInterface> CreateGrGLInterface(
const gl::GLVersionInfo& version_info);
} // namespace init
......
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