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

Issue 11464017: Separate image processing logic from presentation logic. (Closed)

Created:
8 years ago by ncarter (slow)
Modified:
7 years, 11 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

[ui/surface] Separate image processing logic from presentation logic. The D3D image processing code from AcceleratedPresenter moves to its own class, "ui/surface/accelerated_surface_transformer_win.h". This split allows the image processing code to be tested independently of the present-scheduling system, and so we add unit tests doing exactly that. Utility functions (loading d3d, creating temp surfaces) doing things commonly required by test, transform, and present code -- these functions are moved to a third location, "ui/surface/d3d9_utils_win.h" The new unit tests -- which live in the ui_unittests binary -- make extensive use of pseudorandom image content, which I think is kind of neat. The tests use D3D HAL devices; I tried to use REF, but it didn't work, as StretchRect+LINEAR is not supported by refrast. So as a result we may have a GPU vendor dependency in these results. BUG=161537 TEST=new ui_unittests Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=174028 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=174338 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=174943 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=175152 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=175211

Patch Set 1 #

Patch Set 2 : Initial patch set for self-review. #

Patch Set 3 : Nick's repairs after self-review. #

Patch Set 4 : Sync/rebase. #

Total comments: 23

Patch Set 5 : apatrick's fixes. #

Total comments: 9

Patch Set 6 : Found better way to suppress on XP #

Patch Set 7 : Adding SURFACE_EXPORT to fix component build. #

Patch Set 8 : Made new deps Windows-only (yuck) #

Total comments: 2

Patch Set 9 : Accidentally the whole ui.gyp dep #

Patch Set 10 : Marked tests FAILS_, improved early-termination #

Patch Set 11 : Added adapter info. #

Patch Set 12 : Make tests pass on Intel Mobile 965 #

Total comments: 2

Patch Set 13 : Change FAILS_ to FLAKY_ #

Patch Set 14 : Create new test binary for surface tests. #

Patch Set 15 : Remove unnecessary dep. #

Total comments: 2

Patch Set 16 : Fixed dependencies of surface_gpu_tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1127 lines, -268 lines) Patch
A ui/surface/accelerated_surface_transformer_win.h View 1 2 3 4 5 6 1 chunk +81 lines, -0 lines 0 comments Download
A ui/surface/accelerated_surface_transformer_win.cc View 1 2 3 4 1 chunk +261 lines, -0 lines 0 comments Download
A + ui/surface/accelerated_surface_transformer_win.hlsl View 1 2 chunks +2 lines, -2 lines 0 comments Download
A ui/surface/accelerated_surface_transformer_win_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +525 lines, -0 lines 0 comments Download
M ui/surface/accelerated_surface_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 chunks +43 lines, -237 lines 0 comments Download
D ui/surface/accelerated_surface_win.hlsl View 1 1 chunk +0 lines, -28 lines 0 comments Download
A ui/surface/d3d9_utils_win.h View 1 2 3 4 5 6 1 chunk +71 lines, -0 lines 0 comments Download
A ui/surface/d3d9_utils_win.cc View 1 2 1 chunk +119 lines, -0 lines 0 comments Download
M ui/surface/surface.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +25 lines, -1 line 0 comments Download

Messages

Total messages: 33 (0 generated)
ncarter (slow)
Hi Al, Please review and let me know what you think. It probably makes sense ...
8 years ago (2012-12-14 22:07:46 UTC) #1
apatrick_chromium
https://codereview.chromium.org/11464017/diff/6011/ui/surface/accelerated_surface_transformer_win.cc File ui/surface/accelerated_surface_transformer_win.cc (right): https://codereview.chromium.org/11464017/diff/6011/ui/surface/accelerated_surface_transformer_win.cc#newcode174 ui/surface/accelerated_surface_transformer_win.cc:174: device()->SetRenderTarget(0, NULL); This will fail with D3DERR_INVALIDCALL I think. ...
8 years ago (2012-12-14 23:07:58 UTC) #2
ncarter (slow)
https://codereview.chromium.org/11464017/diff/6011/ui/surface/accelerated_surface_transformer_win.cc File ui/surface/accelerated_surface_transformer_win.cc (right): https://codereview.chromium.org/11464017/diff/6011/ui/surface/accelerated_surface_transformer_win.cc#newcode174 ui/surface/accelerated_surface_transformer_win.cc:174: device()->SetRenderTarget(0, NULL); On 2012/12/14 23:07:58, apatrick_chromium wrote: > This ...
8 years ago (2012-12-15 00:04:15 UTC) #3
ncarter (slow)
All fixed. https://codereview.chromium.org/11464017/diff/6011/ui/surface/accelerated_surface_transformer_win.cc File ui/surface/accelerated_surface_transformer_win.cc (right): https://codereview.chromium.org/11464017/diff/6011/ui/surface/accelerated_surface_transformer_win.cc#newcode174 ui/surface/accelerated_surface_transformer_win.cc:174: device()->SetRenderTarget(0, NULL); On 2012/12/15 00:04:15, ncarter wrote: ...
8 years ago (2012-12-17 18:58:59 UTC) #4
ncarter (slow)
https://codereview.chromium.org/11464017/diff/24001/ui/ui_unittests.gypi File ui/ui_unittests.gypi (right): https://codereview.chromium.org/11464017/diff/24001/ui/ui_unittests.gypi#newcode54 ui/ui_unittests.gypi:54: '../ui/surface/surface.gyp:surface', I'm seeing a circular dependency error on the ...
8 years ago (2012-12-17 19:13:48 UTC) #5
apatrick_chromium
LGTM once mac cyclical dependency in figured out. https://codereview.chromium.org/11464017/diff/24001/ui/surface/accelerated_surface_transformer_win_unittest.cc File ui/surface/accelerated_surface_transformer_win_unittest.cc (right): https://codereview.chromium.org/11464017/diff/24001/ui/surface/accelerated_surface_transformer_win_unittest.cc#newcode60 ui/surface/accelerated_surface_transformer_win_unittest.cc:60: rng_.seed(base::Hash(StringPrintf("%s", ...
8 years ago (2012-12-17 21:30:44 UTC) #6
ncarter (slow)
https://codereview.chromium.org/11464017/diff/24001/ui/surface/accelerated_surface_transformer_win_unittest.cc File ui/surface/accelerated_surface_transformer_win_unittest.cc (right): https://codereview.chromium.org/11464017/diff/24001/ui/surface/accelerated_surface_transformer_win_unittest.cc#newcode60 ui/surface/accelerated_surface_transformer_win_unittest.cc:60: rng_.seed(base::Hash(StringPrintf("%s", seed))); On 2012/12/17 21:30:44, apatrick_chromium wrote: > rng_.seed(base::Hash(seed)) ...
8 years ago (2012-12-17 23:48:46 UTC) #7
apatrick_chromium
https://codereview.chromium.org/11464017/diff/24001/ui/surface/accelerated_surface_transformer_win_unittest.cc File ui/surface/accelerated_surface_transformer_win_unittest.cc (right): https://codereview.chromium.org/11464017/diff/24001/ui/surface/accelerated_surface_transformer_win_unittest.cc#newcode278 ui/surface/accelerated_surface_transformer_win_unittest.cc:278: if (!IsVistaOrLater()) On 2012/12/17 23:48:46, ncarter wrote: > On ...
8 years ago (2012-12-18 00:01:12 UTC) #8
ncarter (slow)
I just made the problematic dependency Windows-only, which fixes the problem by sweeping it under ...
8 years ago (2012-12-18 00:19:14 UTC) #9
apatrick_chromium
I have owners in ui/surface. Just one issue remaining. https://codereview.chromium.org/11464017/diff/25015/ui/surface/surface.gyp File ui/surface/surface.gyp (right): https://codereview.chromium.org/11464017/diff/25015/ui/surface/surface.gyp#newcode64 ui/surface/surface.gyp:64: ...
8 years ago (2012-12-18 00:23:20 UTC) #10
ncarter (slow)
On 2012/12/18 00:23:20, apatrick_chromium wrote: > I have owners in ui/surface. Just one issue remaining. ...
8 years ago (2012-12-18 00:33:17 UTC) #11
ncarter (slow)
https://codereview.chromium.org/11464017/diff/25015/ui/surface/surface.gyp File ui/surface/surface.gyp (right): https://codereview.chromium.org/11464017/diff/25015/ui/surface/surface.gyp#newcode64 ui/surface/surface.gyp:64: # '<(DEPTH)/ui/ui.gyp:ui', On 2012/12/18 00:23:21, apatrick_chromium wrote: > This ...
8 years ago (2012-12-18 22:13:42 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nick@chromium.org/11464017/39001
8 years ago (2012-12-18 22:34:31 UTC) #13
commit-bot: I haz the power
Presubmit check for 11464017-39001 failed and returned exit status 1. Running presubmit commit checks ...
8 years ago (2012-12-18 22:34:40 UTC) #14
sky
.gyp* LGTM
8 years ago (2012-12-18 23:38:58 UTC) #15
apatrick_chromium
lgtm
8 years ago (2012-12-19 00:15:56 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nick@chromium.org/11464017/39001
8 years ago (2012-12-19 20:07:52 UTC) #17
commit-bot: I haz the power
Change committed as 174028
8 years ago (2012-12-19 23:07:11 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nick@chromium.org/11464017/39001
8 years ago (2012-12-21 01:47:52 UTC) #19
commit-bot: I haz the power
Change committed as 174338
8 years ago (2012-12-21 03:20:34 UTC) #20
ncarter (slow)
On 2012/12/21 03:20:34, I haz the power (commit-bot) wrote: > Change committed as 174338 FYI ...
8 years ago (2012-12-21 18:46:13 UTC) #21
ncarter (slow)
apatrick, Please take another look -- (patch set 9 vs 12). I've marked the tests ...
8 years ago (2012-12-21 22:30:11 UTC) #22
ncarter (slow)
Ping: Needs an LGTM to land for the third time.
7 years, 11 months ago (2013-01-02 20:23:22 UTC) #23
apatrick_chromium
Sorry for the delay. https://codereview.chromium.org/11464017/diff/54002/ui/surface/accelerated_surface_transformer_win_unittest.cc File ui/surface/accelerated_surface_transformer_win_unittest.cc (right): https://codereview.chromium.org/11464017/diff/54002/ui/surface/accelerated_surface_transformer_win_unittest.cc#newcode79 ui/surface/accelerated_surface_transformer_win_unittest.cc:79: device()->Present(0, 0, 0, 0)); Eek! ...
7 years, 11 months ago (2013-01-02 20:45:58 UTC) #24
ncarter (slow)
https://codereview.chromium.org/11464017/diff/54002/ui/surface/accelerated_surface_transformer_win_unittest.cc File ui/surface/accelerated_surface_transformer_win_unittest.cc (right): https://codereview.chromium.org/11464017/diff/54002/ui/surface/accelerated_surface_transformer_win_unittest.cc#newcode79 ui/surface/accelerated_surface_transformer_win_unittest.cc:79: device()->Present(0, 0, 0, 0)); On 2013/01/02 20:45:58, apatrick_chromium wrote: ...
7 years, 11 months ago (2013-01-02 23:35:21 UTC) #25
apatrick_chromium
On 2013/01/02 23:35:21, ncarter wrote: > https://codereview.chromium.org/11464017/diff/54002/ui/surface/accelerated_surface_transformer_win_unittest.cc > File ui/surface/accelerated_surface_transformer_win_unittest.cc (right): > > https://codereview.chromium.org/11464017/diff/54002/ui/surface/accelerated_surface_transformer_win_unittest.cc#newcode79 > ...
7 years, 11 months ago (2013-01-02 23:38:09 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nick@chromium.org/11464017/54002
7 years, 11 months ago (2013-01-02 23:55:00 UTC) #27
commit-bot: I haz the power
Change committed as 174943
7 years, 11 months ago (2013-01-03 12:09:40 UTC) #28
sadrul
Hi! This CL was reverted because the test was failing on the bots: http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%28dbg%29%281%29/builds/14403 http://build.chromium.org/p/chromium.win/builders/Win7%20Tests%20%283%29/builds/15799 ...
7 years, 11 months ago (2013-01-03 16:38:15 UTC) #29
sadrul
On 2013/01/03 16:38:15, sadrul wrote: > Hi! This CL was reverted because the test was ...
7 years, 11 months ago (2013-01-03 16:41:02 UTC) #30
apatrick_chromium
https://codereview.chromium.org/11464017/diff/85001/ui/surface/surface.gyp File ui/surface/surface.gyp (right): https://codereview.chromium.org/11464017/diff/85001/ui/surface/surface.gyp#newcode61 ui/surface/surface.gyp:61: '<(DEPTH)/ui/gl/gl.gyp:gl', I can't find the dependencies on skia or ...
7 years, 11 months ago (2013-01-04 20:33:01 UTC) #31
ncarter (slow)
PTAL https://codereview.chromium.org/11464017/diff/85001/ui/surface/surface.gyp File ui/surface/surface.gyp (right): https://codereview.chromium.org/11464017/diff/85001/ui/surface/surface.gyp#newcode61 ui/surface/surface.gyp:61: '<(DEPTH)/ui/gl/gl.gyp:gl', On 2013/01/04 20:33:01, apatrick_chromium wrote: > I ...
7 years, 11 months ago (2013-01-04 20:56:27 UTC) #32
apatrick_chromium
7 years, 11 months ago (2013-01-04 21:11:23 UTC) #33
lgtm

Powered by Google App Engine
This is Rietveld 408576698