Commit dba5d7b0 authored by Christopher Cameron's avatar Christopher Cameron Committed by Commit Bot

Don't log unallocated GpuMemoryBuffers in ZeroCopyRasterBufferProvider

Many blink layout tests take this path, resulting in lots of console
spam.

TBR=sunnyps

Bug: 871031, 654631
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;master.tryserver.blink:linux_trusty_blink_rel
Change-Id: I683c42de3c9d956c3ea97f18027e4e1fbe3e5e8e
Reviewed-on: https://chromium-review.googlesource.com/1163179Reviewed-by: default avatarccameron <ccameron@chromium.org>
Commit-Queue: ccameron <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580783}
parent 882982e1
......@@ -128,7 +128,9 @@ class ZeroCopyRasterBufferImpl : public RasterBuffer {
// If GpuMemoryBuffer allocation failed (https://crbug.com/554541), then
// we don't have anything to give to the display compositor, but also no
// way to report an error, so we just make a texture but don't bind
// anything to it..
// anything to it. Many blink layout tests on macOS fail to have no
// |gpu_memory_buffer_| here, so any error reporting will spam console
// logs (https://crbug.com/871031).
if (gpu_memory_buffer_) {
backing_->image_id = gl->CreateImageCHROMIUM(
gpu_memory_buffer_->AsClientBuffer(), resource_size_.width(),
......@@ -141,7 +143,7 @@ class ZeroCopyRasterBufferImpl : public RasterBuffer {
backing_->image_id);
gl->BindTexImage2DCHROMIUM(backing_->texture_target, backing_->image_id);
}
if (resource_color_space_.IsValid()) {
if (backing_->image_id && resource_color_space_.IsValid()) {
gl->SetColorSpaceMetadataCHROMIUM(
backing_->texture_id,
reinterpret_cast<GLColorSpace>(&resource_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