Chromium Code Reviews
DescriptionFix error msg of OffscreenCanvas.commit() on gpu compositing
The previous CL, https://codereview.chromium.org/2607373002/, that fixed
a resizing problem in accelerated 2d canvas, has introduced this error
message "GL_INVALID_ENUM : glTexParameteri: param was GL_FALSE" because
the resource.filter in OffscreenCanvasFrameDispatcherImpl is not set.
This causes ResourceProvider::DeleteAndReturnUnusedResourcesToChild to run
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, 0) as it discovers
a difference between original_filter and filter in resource when closing
down browser.
We then find out that whilst quad.nearest_neighbor indicates the desired
filtering effect on the rendered quad, the resource.filter actually
indicates the filtering algorithm on the resource inherently. To remove
this error msg whilst maintaining the correctness of filtering algorithm
applied on accelerated 2d canvas, we need to specify the resource filter to
GL_NEAREST. Then the overriding mechanism about resource->original_filter
and resource->filter in resource_provider.cc will be able to function
correctly.
In addition, I added GL_TEXTURE_MAG_FILTER as there is no reason why
we only apply linear filtering on MIN_FILTER and not MAG_FILTER.
BUG=692599
Review-Url: https://codereview.chromium.org/2758863003
Cr-Commit-Position: refs/heads/master@{#460488}
Committed: https://chromium.googlesource.com/chromium/src/+/d49d131187ed4e0c3dd5124cdd6ba41cbc06a2a9
Patch Set 1 #Patch Set 2 : m #Messages
Total messages: 13 (9 generated)
|