Commit 0fd470f5 authored by Andres Calderon Jaramillo's avatar Andres Calderon Jaramillo Committed by Commit Bot

viz: Fix uninitialized context_result_ in VizProcessContextProvider.

This CL fixes VizProcessContextProvider to ensure that context_result_
is initialized on construction.

The GLOutputSurfaceBufferQueue tests are re-enabled: they surfaced this
issue and MSAN was failing on Linux.

Bug: 1045602
Test: Run GLOutputSurfaceBufferQueue tests locally with MSAN.
Change-Id: I0e8c3c210d099d4cabe1d583296ec1280ad79cad
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2021543
Auto-Submit: Andres Calderon Jaramillo <andrescj@chromium.org>
Commit-Queue: Robert Kroeger <rjkroege@chromium.org>
Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
Cr-Commit-Position: refs/heads/master@{#735476}
parent ab95157a
......@@ -4,7 +4,6 @@
#include "components/viz/service/display_embedder/gl_output_surface_buffer_queue.h"
#include "build/build_config.h"
#include "components/viz/service/display/output_surface_frame.h"
#include "components/viz/service/display_embedder/buffer_queue.h"
#include "components/viz/test/test_context_provider.h"
......@@ -111,13 +110,7 @@ MATCHER_P(SharedImageEqualTo, expected_shared_image, "") {
// Make sure that the surface uses the buffer queue and the GL context correctly
// when we request it to bind the framebuffer twice and then swap the buffer.
#if defined(OS_LINUX) && defined(MEMORY_SANITIZER)
// TODO(http://crbug.com/1045602): fails on Linux MSAN.
#define MAYBE_BindFramebufferAndSwap DISABLED_BindFramebufferAndSwap
#else
#define MAYBE_BindFramebufferAndSwap BindFramebufferAndSwap
#endif
TEST_F(GLOutputSurfaceBufferQueueTest, MAYBE_BindFramebufferAndSwap) {
TEST_F(GLOutputSurfaceBufferQueueTest, BindFramebufferAndSwap) {
const gpu::SyncToken fake_sync_token(
gpu::CommandBufferNamespace::GPU_IO,
gpu::CommandBufferId::FromUnsafeValue(567u),
......
......@@ -121,7 +121,7 @@ class VIZ_SERVICE_EXPORT VizProcessContextProvider
std::unique_ptr<gpu::TransferBuffer> transfer_buffer_;
std::unique_ptr<gpu::gles2::GLES2Implementation> gles2_implementation_;
std::unique_ptr<ContextCacheController> cache_controller_;
gpu::ContextResult context_result_;
gpu::ContextResult context_result_ = gpu::ContextResult::kSuccess;
std::unique_ptr<skia_bindings::GrContextForGLES2Interface> gr_context_;
......
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