Commit fa39e130 authored by Vladimir Levin's avatar Vladimir Levin Committed by Commit Bot

viz: Initialize members of ScopedGpuMemoryBufferTexture.

The default constructor doesn't initialize the variables, and we have
a DCHECK operator= which may fire if context_provider_ is not null.

I think this isn't currently failing on anything due to the way this
class is created by the caller, but changes in OverlayTexture in
https://chromium-review.googlesource.com/c/chromium/src/+/2305189
expose this bug making the bots fail a lot of the tests. E.g.
https://test-results.appspot.com/data/layout_results/mac-rel/432713/blink_web_tests%20%28with%20patch%29/layout-test-results/results.html

R=weiliangc@chromium.org

Change-Id: Ia96fc4e9efce2763ffde30d11af0c8482757242a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2305516Reviewed-by: default avatarweiliangc <weiliangc@chromium.org>
Commit-Queue: vmpstr <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#789997}
parent c66df030
......@@ -37,9 +37,9 @@ class VIZ_SERVICE_EXPORT ScopedGpuMemoryBufferTexture {
// The ContextProvider used to free the texture when this object is destroyed,
// so it must outlive this object.
ContextProvider* context_provider_;
uint32_t gl_id_;
uint32_t target_;
ContextProvider* context_provider_ = nullptr;
uint32_t gl_id_ = 0;
uint32_t target_ = 0;
gfx::Size size_;
gfx::ColorSpace color_space_;
};
......
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