Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Issue 817673004: cc: TextureUploader - Reset GL_UNPACK_ALIGNMENT to 4 before uploading images. (Closed)

Created:
6 years ago by vmiura
Modified:
5 years, 12 months ago
Reviewers:
danakj, reveman
CC:
chromium-reviews, cc-bugs_chromium.org, Vangelis Kokkevis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: TextureUploader - Reset GL_UNPACK_ALIGNMENT after Gpu Raster. TextureUploader assumes GL_UNPACK_ALIGNMENT is 4 for performance reasons however Ganesh may modify GL_UNPACK_ALIGNMENT. Explicitly reset GL_UNPACK_ALIGNMENT to 4 after Gpu Raster. BUG=442966 Committed: https://crrev.com/188a15c6786087d9be2b0fd92ef05d73b3e8fb27 Cr-Commit-Position: refs/heads/master@{#309653}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Reset GL_UNPACK_ALIGNMENT=4 in ScopedGpuRaster::EndGpuRaster() #

Patch Set 3 : Apply fix to ScopedUseGrContext too (using ScopedGpuRaster for both). #

Patch Set 4 : Use ScopedGpuRaster rather than extend ScopedGpuRaster. #

Total comments: 2

Patch Set 5 : Add unittest for ScopedGpuRaster state restore. #

Total comments: 1

Patch Set 6 : +BUILD.gn #

Patch Set 7 : Bind context provider to current thread. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -12 lines) Patch
M cc/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M cc/cc_tests.gyp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 5 6 3 chunks +13 lines, -10 lines 0 comments Download
M cc/resources/scoped_gpu_raster.cc View 1 3 1 chunk +5 lines, -2 lines 0 comments Download
A cc/resources/scoped_gpu_raster_unittest.cc View 1 2 3 4 5 6 1 chunk +39 lines, -0 lines 0 comments Download
M cc/test/test_gles2_interface.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M cc/test/test_gles2_interface.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
M cc/test/test_web_graphics_context_3d.h View 1 2 3 4 2 chunks +2 lines, -0 lines 0 comments Download
M cc/test/test_web_graphics_context_3d.cc View 1 2 3 4 3 chunks +25 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (2 generated)
vmiura
danakj@chromium.org: Please review all changes. reveman@chromium.org: Please review all changes.
6 years ago (2014-12-19 19:54:24 UTC) #2
danakj
https://codereview.chromium.org/817673004/diff/1/cc/resources/texture_uploader.cc File cc/resources/texture_uploader.cc (right): https://codereview.chromium.org/817673004/diff/1/cc/resources/texture_uploader.cc#newcode254 cc/resources/texture_uploader.cc:254: gl_->PixelStorei(GL_UNPACK_ALIGNMENT, 4); Should we do this when we take ...
6 years ago (2014-12-19 20:00:46 UTC) #3
vmiura
https://codereview.chromium.org/817673004/diff/1/cc/resources/texture_uploader.cc File cc/resources/texture_uploader.cc (right): https://codereview.chromium.org/817673004/diff/1/cc/resources/texture_uploader.cc#newcode254 cc/resources/texture_uploader.cc:254: gl_->PixelStorei(GL_UNPACK_ALIGNMENT, 4); On 2014/12/19 20:00:46, danakj wrote: > Should ...
6 years ago (2014-12-19 21:28:16 UTC) #4
danakj
On 2014/12/19 21:28:16, vmiura wrote: > https://codereview.chromium.org/817673004/diff/1/cc/resources/texture_uploader.cc > File cc/resources/texture_uploader.cc (right): > > https://codereview.chromium.org/817673004/diff/1/cc/resources/texture_uploader.cc#newcode254 > ...
6 years ago (2014-12-19 21:31:28 UTC) #5
vmiura
> While that's true, from the comments this seems quite intentional, and avoiding > it ...
6 years ago (2014-12-19 22:28:31 UTC) #6
danakj
LGTM if that fixes it. Do we need to do this in GLRenderer too?
6 years ago (2014-12-19 22:29:32 UTC) #7
danakj
On 2014/12/19 22:29:32, danakj wrote: > LGTM if that fixes it. Do we need to ...
6 years ago (2014-12-19 22:32:30 UTC) #8
vmiura
On 2014/12/19 22:32:30, danakj wrote: > On 2014/12/19 22:29:32, danakj wrote: > > LGTM if ...
6 years ago (2014-12-19 23:04:15 UTC) #9
danakj
On Fri, Dec 19, 2014 at 3:04 PM, <vmiura@chromium.org> wrote: > On 2014/12/19 22:32:30, danakj ...
6 years ago (2014-12-19 23:07:31 UTC) #10
vmiura
Added for ScopedUseGrContext as well. PTAL.
6 years ago (2014-12-19 23:44:39 UTC) #11
danakj
Looks like some cc_ and compositor_unittest failures to resolve. On Dec 19, 2014 3:44 PM, ...
6 years ago (2014-12-20 07:11:39 UTC) #12
vmiura
> Looks like some cc_ and compositor_unittest failures to resolve. Yeah, sorry inheritance was the ...
6 years ago (2014-12-22 21:08:04 UTC) #13
danakj
LGTM, but https://codereview.chromium.org/817673004/diff/60001/cc/resources/scoped_gpu_raster.cc File cc/resources/scoped_gpu_raster.cc (right): https://codereview.chromium.org/817673004/diff/60001/cc/resources/scoped_gpu_raster.cc#newcode42 cc/resources/scoped_gpu_raster.cc:42: // Restore default GL unpack alignment. TextureUploader ...
6 years ago (2014-12-23 17:24:36 UTC) #14
vmiura
https://codereview.chromium.org/817673004/diff/60001/cc/resources/scoped_gpu_raster.cc File cc/resources/scoped_gpu_raster.cc (right): https://codereview.chromium.org/817673004/diff/60001/cc/resources/scoped_gpu_raster.cc#newcode42 cc/resources/scoped_gpu_raster.cc:42: // Restore default GL unpack alignment. TextureUploader expects this. ...
6 years ago (2014-12-23 23:58:14 UTC) #15
danakj
Cool, LGTM https://codereview.chromium.org/817673004/diff/80001/cc/cc_tests.gyp File cc/cc_tests.gyp (right): https://codereview.chromium.org/817673004/diff/80001/cc/cc_tests.gyp#newcode88 cc/cc_tests.gyp:88: 'resources/scoped_gpu_raster_unittest.cc', add to BUILD.gn too?
6 years ago (2014-12-24 00:52:16 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/817673004/120001
5 years, 12 months ago (2014-12-25 22:11:08 UTC) #18
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years, 12 months ago (2014-12-25 23:11:43 UTC) #19
commit-bot: I haz the power
5 years, 12 months ago (2014-12-25 23:12:36 UTC) #20
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/188a15c6786087d9be2b0fd92ef05d73b3e8fb27
Cr-Commit-Position: refs/heads/master@{#309653}

Powered by Google App Engine
This is Rietveld 408576698