|
|
Created:
4 years, 4 months ago by boliu Modified:
4 years, 4 months ago Reviewers:
danakj CC:
chromium-reviews, mlamouri+watch-content_chromium.org, cc-bugs_chromium.org, jam, darin-cc_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Descriptionsync compositor: Set display viewport for software draw
After switching to using cc::Display for software draw, this fixes the
case where the viewport is not at the origin of the surface.
BUG=631276
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel
Committed: https://crrev.com/4dae52297b5786ca794317adf11ca39468ee47a6
Cr-Commit-Position: refs/heads/master@{#408288}
Patch Set 1 #
Total comments: 6
Patch Set 2 : review #Patch Set 3 : don't set surface_size_ #
Total comments: 2
Patch Set 4 : SkISizeToSize #
Messages
Total messages: 32 (16 generated)
Description was changed from ========== sync compositor: Set display viewport for software draw After switching to using cc::Display for software draw, this fixes the case where the viewport is not at the origin of the surface. BUG=631276 ========== to ========== sync compositor: Set display viewport for software draw After switching to using cc::Display for software draw, this fixes the case where the viewport is not at the origin of the surface. BUG=631276 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_blink_rel ==========
boliu@chromium.org changed reviewers: + danakj@chromium.org
ptal, somewhat more involved than I thought, need to plumb both the correct surface size (which is not necessarily the frame size), and the correct viewport I was curious why hardware_renderer doesn't need SetExternalViewport, turns out that's handled by having another root surface, which handles both the "viewport", and applying the transform. software draws don't have a matrix to apply, but could use another surface to apply the viewport as well I guess, but seems overkill. After this one lands, I want to explore removing viewport and clip from LTHI::OnDraw.
https://codereview.chromium.org/2187563006/diff/1/content/renderer/android/sy... File content/renderer/android/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/2187563006/diff/1/content/renderer/android/sy... content/renderer/android/synchronous_compositor_output_surface.cc:338: surface_size_ = gfx::Size(canvas->getBaseLayerSize().width(), Ahh. Does it need to be a member on SCOS still too or can it be a local var here? https://codereview.chromium.org/2187563006/diff/1/content/renderer/android/sy... File content/renderer/android/synchronous_compositor_output_surface.h (right): https://codereview.chromium.org/2187563006/diff/1/content/renderer/android/sy... content/renderer/android/synchronous_compositor_output_surface.h:162: SoftwareOutputSurface* software_output_surface_; // Owned by |display_|. = nullptr here instead of in constructor?
The CQ bit was checked by danakj@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Your CL was about to rely on recently removed CQ feature(s): * master.tryserver.blink builder linux_blink_rel was renamed to linux_precise_blink_rel (http://crbug.com/590036)
https://codereview.chromium.org/2187563006/diff/1/content/renderer/android/sy... File content/renderer/android/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/2187563006/diff/1/content/renderer/android/sy... content/renderer/android/synchronous_compositor_output_surface.cc:338: surface_size_ = gfx::Size(canvas->getBaseLayerSize().width(), On 2016/07/27 21:28:36, danakj wrote: > Ahh. Does it need to be a member on SCOS still too or can it be a local var > here? Hmm... in practice, no, because DelegatingRenderer doesn't use this at all, so don't need to set it in DemandDrawHw either. But if only remove it here, then it makes no sense for SCOS to have the surface size from hardware draw, even if it's not used. Long term, it would be good to like have cc::Display use a separate OutputSurface type, and only have all this resize logic on that type. In this CL? Umm, keep it just to be consistent with everything else? https://codereview.chromium.org/2187563006/diff/1/content/renderer/android/sy... File content/renderer/android/synchronous_compositor_output_surface.h (right): https://codereview.chromium.org/2187563006/diff/1/content/renderer/android/sy... content/renderer/android/synchronous_compositor_output_surface.h:162: SoftwareOutputSurface* software_output_surface_; // Owned by |display_|. On 2016/07/27 21:28:36, danakj wrote: > = nullptr here instead of in constructor? Done.
LGTM https://codereview.chromium.org/2187563006/diff/1/content/renderer/android/sy... File content/renderer/android/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/2187563006/diff/1/content/renderer/android/sy... content/renderer/android/synchronous_compositor_output_surface.cc:338: surface_size_ = gfx::Size(canvas->getBaseLayerSize().width(), On 2016/07/27 21:43:04, boliu wrote: > On 2016/07/27 21:28:36, danakj wrote: > > Ahh. Does it need to be a member on SCOS still too or can it be a local var > > here? > > Hmm... in practice, no, because DelegatingRenderer doesn't use this at all, so > don't need to set it in DemandDrawHw either. > > But if only remove it here, then it makes no sense for SCOS to have the surface > size from hardware draw, even if it's not used. > > Long term, it would be good to like have cc::Display use a separate > OutputSurface type, and only have all this resize logic on that type. I'm working toward that right now. > In this CL? Umm, keep it just to be consistent with everything else? If you make it different now with comments it'll make it easier for me to split the two APIs apart and understand what needs to be on the LTHI's API vs the Display's API. Or at least put some TODOs/comments explaining. But I'd prefer to not set things that won't be used.
https://codereview.chromium.org/2187563006/diff/1/content/renderer/android/sy... File content/renderer/android/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/2187563006/diff/1/content/renderer/android/sy... content/renderer/android/synchronous_compositor_output_surface.cc:338: surface_size_ = gfx::Size(canvas->getBaseLayerSize().width(), On 2016/07/27 21:49:53, danakj wrote: > On 2016/07/27 21:43:04, boliu wrote: > > On 2016/07/27 21:28:36, danakj wrote: > > > Ahh. Does it need to be a member on SCOS still too or can it be a local var > > > here? > > > > Hmm... in practice, no, because DelegatingRenderer doesn't use this at all, so > > don't need to set it in DemandDrawHw either. > > > > But if only remove it here, then it makes no sense for SCOS to have the > surface > > size from hardware draw, even if it's not used. > > > > Long term, it would be good to like have cc::Display use a separate > > OutputSurface type, and only have all this resize logic on that type. > > I'm working toward that right now. > > > In this CL? Umm, keep it just to be consistent with everything else? > > If you make it different now with comments it'll make it easier for me to split > the two APIs apart and understand what needs to be on the LTHI's API vs the > Display's API. Or at least put some TODOs/comments explaining. But I'd prefer to > not set things that won't be used. Ok, not setting SCOS::surface_size_ anywhere, and it will remain empty. That's consistent too :p
The CQ bit was checked by boliu@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from danakj@chromium.org Link to the patchset: https://codereview.chromium.org/2187563006/#ps40001 (title: "don't set surface_size_")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Your CL was about to rely on recently removed CQ feature(s): * master.tryserver.blink builder linux_blink_rel was renamed to linux_precise_blink_rel (http://crbug.com/590036)
Nice, LGTM https://codereview.chromium.org/2187563006/diff/40001/content/renderer/androi... File content/renderer/android/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/2187563006/diff/40001/content/renderer/androi... content/renderer/android/synchronous_compositor_output_surface.cc:339: gfx::Size surface_size(canvas->getBaseLayerSize().width(), nit: You could do s_o_s_->SetSurfaceSize(gfx::SkISizeToSize(canvas->getBaseLayerSize()));
https://codereview.chromium.org/2187563006/diff/40001/content/renderer/androi... File content/renderer/android/synchronous_compositor_output_surface.cc (right): https://codereview.chromium.org/2187563006/diff/40001/content/renderer/androi... content/renderer/android/synchronous_compositor_output_surface.cc:339: gfx::Size surface_size(canvas->getBaseLayerSize().width(), On 2016/07/27 22:18:03, danakj wrote: > nit: You could do > s_o_s_->SetSurfaceSize(gfx::SkISizeToSize(canvas->getBaseLayerSize())); Done.
The CQ bit was checked by boliu@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from danakj@chromium.org Link to the patchset: https://codereview.chromium.org/2187563006/#ps60001 (title: "SkISizeToSize")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Your CL was about to rely on recently removed CQ feature(s): * master.tryserver.blink builder linux_blink_rel was renamed to linux_precise_blink_rel (http://crbug.com/590036)
On 2016/07/27 22:30:10, commit-bot: I haz the power wrote: > Your CL was about to rely on recently removed CQ feature(s): > * master.tryserver.blink builder linux_blink_rel was renamed to > linux_precise_blink_rel (http://crbug.com/590036) Hmm, I think cq is actually rejecting this due to ^^^, should fix the presubmit. Or maybe I just need to sync
Description was changed from ========== sync compositor: Set display viewport for software draw After switching to using cc::Display for software draw, this fixes the case where the viewport is not at the origin of the surface. BUG=631276 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_blink_rel ========== to ========== sync compositor: Set display viewport for software draw After switching to using cc::Display for software draw, this fixes the case where the viewport is not at the origin of the surface. BUG=631276 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel ==========
The CQ bit was checked by boliu@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
On 2016/07/27 22:31:22, boliu wrote: > On 2016/07/27 22:30:10, commit-bot: I haz the power wrote: > > Your CL was about to rely on recently removed CQ feature(s): > > * master.tryserver.blink builder linux_blink_rel was renamed to > > linux_precise_blink_rel (http://crbug.com/590036) > > Hmm, I think cq is actually rejecting this due to ^^^, should fix the presubmit. > Or maybe I just need to sync Codesearch doesn't show it yet, but I think new patches should work: https://codereview.chromium.org/2183323002/diff/1/cc/PRESUBMIT.py
Message was sent while issue was closed.
Description was changed from ========== sync compositor: Set display viewport for software draw After switching to using cc::Display for software draw, this fixes the case where the viewport is not at the origin of the surface. BUG=631276 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel ========== to ========== sync compositor: Set display viewport for software draw After switching to using cc::Display for software draw, this fixes the case where the viewport is not at the origin of the surface. BUG=631276 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== sync compositor: Set display viewport for software draw After switching to using cc::Display for software draw, this fixes the case where the viewport is not at the origin of the surface. BUG=631276 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel ========== to ========== sync compositor: Set display viewport for software draw After switching to using cc::Display for software draw, this fixes the case where the viewport is not at the origin of the surface. BUG=631276 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/4dae52297b5786ca794317adf11ca39468ee47a6 Cr-Commit-Position: refs/heads/master@{#408288} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/4dae52297b5786ca794317adf11ca39468ee47a6 Cr-Commit-Position: refs/heads/master@{#408288} |