Remove stretch_content_to_fill_bounds from cc::SurfaceLayer::SetSurfaceInfo |
|||||
Issue descriptionFigure out if it's better to be a part of SurfaceInfo or a separate method such as SetStretchContentToFillBounds.
,
Dec 29 2016
What problem is it creating where it is?
,
Dec 29 2016
,
Dec 29 2016
Thinking out loud: It's a nitpick at best, but I don't like it either as it is. Maybe that's because SurfaceLayer::SetSurfaceInfo is a bad name? I'm not sure. It feels like SetSurfaceInfo should just set the SurfaceInfo and not also other stuff. Note that SurfaceInfo will be a struct that's sent over IPC and will be part of the Mus API. See https://crbug.com/676375 . stretch_content_to_fill_bounds seems like an entirely client side property and shouldn't be part of SurfaceInfo. If we think of cc::Layer and in particular cc::SurfaceLayer as part of the Mus client library then I think it's worthwhile to ask about what is the simplest, most intuitive API for clients. Of course, this is a matter of opinion, but I think it's fair to say that as a rule of thumb, the more knobs that need to be set to get something on screen initially makes an API harder to use. It seems nice to minimize the number of flags that need to be set to get something on screen while allowing for more customizability later. With that reasoning, I think I'm in favor of SetStretchContentToFillBounds.
,
Jan 4 2017
ok that's fine, I think the names just happened to collide here probably.. but the principle of a separate setter here seems okay.
,
Jan 9 2017
I think once we do this, UpdateDrawsContent and SetNeedsPushProperties have to be called in each setter which means if we call both setters these methods will be called twice which I know is not wrong but I'm wondering about the effect on the performance.
,
Jan 9 2017
They just set some bits, have a look. The performance impact is during the next push properties, which is the same no matter how many times you called it.
,
Jan 9 2017
Then a separate setter sounds very reasonable to me.
,
Jan 10 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e8fd2e59b07fd42d8716675265d4b67419fcc726 commit e8fd2e59b07fd42d8716675265d4b67419fcc726 Author: samans <samans@chromium.org> Date: Tue Jan 10 00:23:13 2017 Remove stretch_content_to_fill_bounds from cc::SurfaceLayer::SetSurfaceInfo Currently cc::SurfaceLayer::SetSurfaceInfo takes in stretch_content_to_fill_bounds which doesn't belong there because the purpose of this method is to set SurfaceInfo and only SurfaceInfo. A separate method called SetStretchContentToFillBounds is created instead. TBR=darin@chromium.org BUG= 675313 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2621653002 Cr-Commit-Position: refs/heads/master@{#442414} [modify] https://crrev.com/e8fd2e59b07fd42d8716675265d4b67419fcc726/blimp/client/core/compositor/blimp_compositor.cc [modify] https://crrev.com/e8fd2e59b07fd42d8716675265d4b67419fcc726/cc/layers/surface_layer.cc [modify] https://crrev.com/e8fd2e59b07fd42d8716675265d4b67419fcc726/cc/layers/surface_layer.h [modify] https://crrev.com/e8fd2e59b07fd42d8716675265d4b67419fcc726/cc/layers/surface_layer_unittest.cc [modify] https://crrev.com/e8fd2e59b07fd42d8716675265d4b67419fcc726/content/renderer/child_frame_compositing_helper.cc [modify] https://crrev.com/e8fd2e59b07fd42d8716675265d4b67419fcc726/third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp [modify] https://crrev.com/e8fd2e59b07fd42d8716675265d4b67419fcc726/ui/android/delegated_frame_host_android.cc [modify] https://crrev.com/e8fd2e59b07fd42d8716675265d4b67419fcc726/ui/compositor/layer.cc
,
Jan 16 2017
,
Jun 13 2017
,
Feb 26 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by fsam...@chromium.org
, Dec 24 2016Cc: rjkroege@chromium.org sadrul@chromium.org piman@chromium.org danakj@chromium.org fsam...@chromium.org enne@chromium.org
Components: Internals>MUS
Labels: Proj-Mustash-Mus Proj-Mustash-Mus-GPU