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

Issue 12665005: cc: Use highp precision for texture coords if available and needed (Closed)

Created:
7 years, 9 months ago by brianderson
Modified:
7 years, 8 months ago
CC:
chromium-reviews, cc-bugs_chromium.org, Vangelis Kokkevis, Sami (do not use)
Base URL:
http://git.chromium.org/chromium/src.git@highp2
Visibility:
Public.

Description

cc: Use highp precision for texture coords if available and needed This fixes an earlier version of this patch that had a bug in FragmentShaderRGBATexAlphaMask. High precision is only used when the source is greater than N pixels in any direction to prevent performance regressions. N is determined based on the actual precision of mediump reported by the driver. BUG=183581 BUG=173747 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=191692

Patch Set 1 #

Patch Set 2 : merge needed and supported patches #

Patch Set 3 : rebase #

Patch Set 4 : rebase #

Patch Set 5 : Cleanup highp shaders #

Total comments: 9

Patch Set 6 : Remove dead code #

Patch Set 7 : Allow for variable highp threshold. Default to 2048 on Android. #

Patch Set 8 : rebase. use kConstant style. #

Patch Set 9 : Dynamically set highp threshold based on actual mediump precision #

Total comments: 3

Patch Set 10 : DCHECK usage of NA precision. Fix tests and nits. #

Patch Set 11 : Be conservative on Android #

Total comments: 1

Patch Set 12 : Rebase on pending Chromification https://codereview.chromium.org/13004003 #

Total comments: 2

Patch Set 13 : Add threshold setting. Add tets. #

Patch Set 14 : set setting in compositor_impl_android.cc #

Patch Set 15 : Attempt to fix linker error. #

Patch Set 16 : fix compile/linker errors #

Patch Set 17 : Fix more tests! #

Patch Set 18 : remove small formating-only change #

Patch Set 19 : fix rebase #

Patch Set 20 : rebase after all dependencies landed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+772 lines, -373 lines) Patch
M cc/cc_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M cc/debug/fake_web_graphics_context_3d.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M cc/debug/fake_web_graphics_context_3d.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +44 lines, -0 lines 0 comments Download
M cc/layers/nine_patch_layer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/tiled_layer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M cc/output/gl_renderer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 6 chunks +50 lines, -15 lines 0 comments Download
M cc/output/gl_renderer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 32 chunks +249 lines, -130 lines 0 comments Download
M cc/output/gl_renderer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 14 chunks +40 lines, -31 lines 0 comments Download
M cc/output/program_binding.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +7 lines, -4 lines 0 comments Download
M cc/output/shader.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 13 chunks +43 lines, -21 lines 0 comments Download
M cc/output/shader.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 35 chunks +215 lines, -125 lines 0 comments Download
A cc/output/shader_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +46 lines, -0 lines 0 comments Download
M cc/output/software_renderer_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M cc/output/texture_copier.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +8 lines, -3 lines 0 comments Download
M cc/output/texture_copier.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 3 chunks +24 lines, -8 lines 0 comments Download
M cc/output/texture_copier_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/picture_layer_tiling_set_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/prioritized_resource_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -1 line 0 comments Download
M cc/resources/resource_provider.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 2 chunks +3 lines, -2 lines 0 comments Download
M cc/resources/resource_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 3 chunks +6 lines, -5 lines 0 comments Download
M cc/resources/resource_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 9 chunks +9 lines, -9 lines 0 comments Download
M cc/resources/resource_update_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -1 line 0 comments Download
M cc/resources/scoped_resource_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 4 chunks +4 lines, -4 lines 0 comments Download
M cc/test/pixel_test.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +3 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +4 lines, -3 lines 0 comments Download
M cc/trees/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +2 lines, -2 lines 0 comments Download
M cc/trees/layer_tree_settings.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M cc/trees/layer_tree_settings.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/renderer_host/compositor_impl_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/gpu/render_widget_compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 42 (0 generated)
brianderson
Please take a look. This version is based on https://codereview.chromium.org/12314003, which had to be reverted ...
7 years, 9 months ago (2013-03-20 18:55:22 UTC) #1
brianderson
https://codereview.chromium.org/12665005/diff/21001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/12665005/diff/21001/cc/output/gl_renderer.cc#newcode718 cc/output/gl_renderer.cc:718: quad->shared_quad_state->visible_content_rect.bottom_right()); enne: Is this a good way to determine ...
7 years, 9 months ago (2013-03-20 18:58:10 UTC) #2
vangelis
I like the new direction. In addition to the comments, please watch out for 80col ...
7 years, 9 months ago (2013-03-20 19:20:44 UTC) #3
aelias_OOO_until_Jul13
https://codereview.chromium.org/12665005/diff/21001/cc/output/shader.cc File cc/output/shader.cc (right): https://codereview.chromium.org/12665005/diff/21001/cc/output/shader.cc#newcode64 cc/output/shader.cc:64: if (max_coordinate.x() > 1024 || max_coordinate.y() > 1024) 1280 ...
7 years, 9 months ago (2013-03-20 19:55:01 UTC) #4
brianderson
I will likely rebase this on top of https://codereview.chromium.org/12844006/ to address the 80 column limit ...
7 years, 9 months ago (2013-03-20 20:57:15 UTC) #5
aelias_OOO_until_Jul13
We're drawing from a near-screen-size FBO to a hardware overlay as one big TextureDrawQuad. The ...
7 years, 9 months ago (2013-03-20 22:37:18 UTC) #6
brianderson
Talked with aelias and we decided to make the highp threshold easily adjustable from LayerTreeSettings. ...
7 years, 9 months ago (2013-03-21 00:50:00 UTC) #7
Sami
I like this solution. Plumbing the highp threshold everywhere seems like a pain, though. It ...
7 years, 9 months ago (2013-03-21 12:07:57 UTC) #8
brianderson
On 2013/03/21 12:07:57, Sami wrote: > I like this solution. Plumbing the highp threshold everywhere ...
7 years, 9 months ago (2013-03-21 18:20:21 UTC) #9
brianderson
Latest version sets the highp threshold based on the actual precision of mediump. Alex, is ...
7 years, 9 months ago (2013-03-21 22:28:11 UTC) #10
aelias_OOO_until_Jul13
Seems good provided the query works as it should in reality. What values does the ...
7 years, 9 months ago (2013-03-22 01:42:25 UTC) #11
Sami
I think this looks much better now, lgtm. https://codereview.chromium.org/12665005/diff/47001/cc/output/gl_renderer.cc File cc/output/gl_renderer.cc (right): https://codereview.chromium.org/12665005/diff/47001/cc/output/gl_renderer.cc#newcode2018 cc/output/gl_renderer.cc:2018: debug_border_program_ ...
7 years, 9 months ago (2013-03-22 11:14:34 UTC) #12
brianderson
Note: N4 is the only device I tested that reports 24 bits of precision for ...
7 years, 9 months ago (2013-03-22 22:04:44 UTC) #13
brianderson
N7 reports that mediump has 13 bits of precision. I talked with Alex again and, ...
7 years, 9 months ago (2013-03-22 22:42:10 UTC) #14
brianderson
https://codereview.chromium.org/12665005/diff/70001/cc/output/shader.cc File cc/output/shader.cc (right): https://codereview.chromium.org/12665005/diff/70001/cc/output/shader.cc#newcode84 cc/output/shader.cc:84: return std::max(1 << precision, 2048); Alex, what do you ...
7 years, 9 months ago (2013-03-22 22:57:07 UTC) #15
brianderson
Rebased on pending chromification patch: https://codereview.chromium.org/12844006
7 years, 9 months ago (2013-03-23 02:30:25 UTC) #16
aelias_OOO_until_Jul13
https://codereview.chromium.org/12665005/diff/74001/cc/output/shader.cc File cc/output/shader.cc (right): https://codereview.chromium.org/12665005/diff/74001/cc/output/shader.cc#newcode88 cc/output/shader.cc:88: #if defined(OS_ANDROID) Fine functionality-wise, but there shouldn't be any ...
7 years, 9 months ago (2013-03-24 00:52:02 UTC) #17
danakj
https://codereview.chromium.org/12665005/diff/74001/cc/output/shader.cc File cc/output/shader.cc (right): https://codereview.chromium.org/12665005/diff/74001/cc/output/shader.cc#newcode88 cc/output/shader.cc:88: #if defined(OS_ANDROID) On 2013/03/24 00:52:02, aelias wrote: > Fine ...
7 years, 9 months ago (2013-03-24 17:39:58 UTC) #18
brianderson
The settings have been added back in and I've updated the gl_renderer_unittest.cc and added a ...
7 years, 9 months ago (2013-03-25 22:58:48 UTC) #19
aelias_OOO_until_Jul13
Please also add the setting in content/browser/renderer_host/compositor_impl_android.cc
7 years, 9 months ago (2013-03-25 23:01:52 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/12665005/87001
7 years, 9 months ago (2013-03-25 23:48:50 UTC) #21
commit-bot: I haz the power
Presubmit check for 12665005-87001 failed and returned exit status 1. INFO:root:Found 30 file(s). Running presubmit ...
7 years, 9 months ago (2013-03-25 23:49:06 UTC) #22
aelias_OOO_until_Jul13
lgtm for content/browser/renderer_host/compositor_impl_android.cc
7 years, 9 months ago (2013-03-25 23:50:45 UTC) #23
brianderson
Al, can you review content/renderer/gpu/render_widget_compositor.cc ? I need an owner's lgtm.
7 years, 9 months ago (2013-03-25 23:52:22 UTC) #24
jamesr
lgtm for content/renderer/gpu/
7 years, 9 months ago (2013-03-25 23:54:27 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/12665005/87001
7 years, 9 months ago (2013-03-26 00:00:40 UTC) #26
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 9 months ago (2013-03-26 00:38:35 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/12665005/113002
7 years, 9 months ago (2013-03-26 01:01:36 UTC) #28
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 9 months ago (2013-03-26 01:39:48 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/12665005/118003
7 years, 9 months ago (2013-03-26 02:18:48 UTC) #30
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) aura_unittests, compositor_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=26918
7 years, 9 months ago (2013-03-26 03:29:56 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/12665005/118003
7 years, 9 months ago (2013-03-26 18:02:07 UTC) #32
commit-bot: I haz the power
Retried try job too often on win_x64_rel for step(s) compile http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win_x64_rel&number=5298
7 years, 9 months ago (2013-03-26 18:24:00 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/12665005/133001
7 years, 9 months ago (2013-03-27 00:20:46 UTC) #34
commit-bot: I haz the power
Presubmit check for 12665005-133001 failed and returned exit status 1. INFO:root:Found 31 file(s). Running presubmit ...
7 years, 9 months ago (2013-03-27 00:21:03 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/12665005/137001
7 years, 9 months ago (2013-03-27 00:26:28 UTC) #36
commit-bot: I haz the power
Failed to trigger a try job on win7_aura HTTP Error 400: Bad Request
7 years, 9 months ago (2013-03-27 00:40:39 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/12665005/142001
7 years, 9 months ago (2013-03-27 00:40:50 UTC) #38
commit-bot: I haz the power
Retried try job too often on linux_aura for step(s) compositor_unittests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_aura&number=27209
7 years, 9 months ago (2013-03-27 01:34:04 UTC) #39
brianderson
Tests are failing because the in-process implementation of glGetShaderPrecision format is missing some workarounds. This ...
7 years, 9 months ago (2013-03-27 02:37:35 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/brianderson@chromium.org/12665005/159001
7 years, 8 months ago (2013-04-01 18:34:34 UTC) #41
commit-bot: I haz the power
7 years, 8 months ago (2013-04-01 23:03:12 UTC) #42
Message was sent while issue was closed.
Change committed as 191692

Powered by Google App Engine
This is Rietveld 408576698