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

Issue 2720503008: Add cc::SurfaceInfo::is_valid() (Closed)

Created:
3 years, 9 months ago by Alex Z.
Modified:
3 years, 9 months ago
CC:
ajuma+watch_chromium.org, blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, fmalita+watch_chromium.org, jbauman+watch_chromium.org, jbroman, Justin Novosad, kalyank, kinuko+watch, pdr+graphicswatchlist_chromium.org, piman+watch_chromium.org, rjkroege, rwlbuis, sadrul, Stephen Chennney, Ian Vollick
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add cc::SurfaceInfo::is_valid() SurfaceInfo::is_valid() returns true iff the SurfaceId is valid AND the device scale factor is non-zero AND the frame size is not empty. SurfaceInfo::is_valid() replaces obtaining and checking if the SurfaceId of a SurfaceInfo object is valid. While that is a necessary condition of validity of a SurfaceInfo, it is technically insufficient. BUG=695420 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2720503008 Cr-Commit-Position: refs/heads/master@{#453998} Committed: https://chromium.googlesource.com/chromium/src/+/9afc576bd3e06d83d6abc870000293b4be9d6132

Patch Set 1 #

Patch Set 2 : Check is_valid() during deserialization #

Total comments: 2

Patch Set 3 : Check is_valid() in SurfaceInfo ParamTraits deserialization and added param traits unit test #

Patch Set 4 : Added Log() #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -24 lines) Patch
M cc/ipc/cc_param_traits.h View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M cc/ipc/cc_param_traits.cc View 1 2 3 1 chunk +42 lines, -0 lines 0 comments Download
M cc/ipc/cc_param_traits_macros.h View 1 2 1 chunk +0 lines, -6 lines 0 comments Download
M cc/ipc/cc_param_traits_unittest.cc View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
M cc/ipc/surface_info_struct_traits.h View 1 1 chunk +1 line, -1 line 0 comments Download
M cc/layers/surface_layer.cc View 1 2 3 2 chunks +3 lines, -3 lines 0 comments Download
M cc/layers/surface_layer_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M cc/surfaces/surface_info.h View 1 chunk +5 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_impl.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M services/ui/ws/frame_generator.cc View 4 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/CanvasSurfaceLayerBridge.cpp View 1 chunk +1 line, -1 line 0 comments Download
M ui/aura/mus/window_port_mus.cc View 3 chunks +4 lines, -4 lines 0 comments Download
M ui/compositor/layer.cc View 1 2 3 1 chunk +1 line, -2 lines 0 comments Download

Messages

Total messages: 48 (26 generated)
Alex Z.
sky@chromium.org: Please review changes in services/ui, third_party and ui/aura danakj@chromium.org: Please review changes in cc ...
3 years, 9 months ago (2017-02-28 01:40:12 UTC) #3
Fady Samuel
lgtm
3 years, 9 months ago (2017-02-28 01:44:41 UTC) #6
Alex Z.
- danakj@ since she's OOO. enne@: Please review changes in cc. sky@: Please also review ...
3 years, 9 months ago (2017-02-28 01:52:45 UTC) #8
Fady Samuel
Actually, could you please update the StructTraits and ParamTraits too?
3 years, 9 months ago (2017-02-28 01:56:10 UTC) #9
Fady Samuel
https://cs.chromium.org/chromium/src/cc/ipc/surface_info_struct_traits.h?q=surface_info_+package:%5Echromium$&l=28 Deserialization should fail if SurfaceInfo is invalid. We should not be sending invalid SurfaceInfos ...
3 years, 9 months ago (2017-02-28 01:57:03 UTC) #10
Alex Z.
On 2017/02/28 01:57:03, Fady Samuel wrote: > https://cs.chromium.org/chromium/src/cc/ipc/surface_info_struct_traits.h?q=surface_info_+package:%5Echromium$&l=28 > > Deserialization should fail if SurfaceInfo ...
3 years, 9 months ago (2017-02-28 02:30:58 UTC) #11
Alex Z.
tsepez@: Please review changes in struct traits.
3 years, 9 months ago (2017-02-28 02:31:33 UTC) #13
Fady Samuel
For SurfaceInfo ParamTraits, we currently use macros: https://cs.chromium.org/chromium/src/cc/ipc/cc_param_traits_macros.h?l=202 You'll have to write custom paramtraits similar ...
3 years, 9 months ago (2017-02-28 02:54:32 UTC) #14
sky
LGTM
3 years, 9 months ago (2017-02-28 05:04:44 UTC) #15
Tom Sepez
lgtm https://codereview.chromium.org/2720503008/diff/20001/cc/ipc/surface_info_struct_traits.h File cc/ipc/surface_info_struct_traits.h (right): https://codereview.chromium.org/2720503008/diff/20001/cc/ipc/surface_info_struct_traits.h#newcode30 cc/ipc/surface_info_struct_traits.h:30: data.ReadSizeInPixels(&out->size_in_pixels_) && out->is_valid(); On 2017/02/28 02:54:32, Fady Samuel ...
3 years, 9 months ago (2017-02-28 17:52:02 UTC) #16
enne (OOO)
lgtm
3 years, 9 months ago (2017-02-28 18:05:56 UTC) #17
Fady Samuel
On 2017/02/28 17:52:02, Tom Sepez wrote: > lgtm > > https://codereview.chromium.org/2720503008/diff/20001/cc/ipc/surface_info_struct_traits.h > File cc/ipc/surface_info_struct_traits.h (right): ...
3 years, 9 months ago (2017-02-28 18:12:08 UTC) #18
Alex Z.
On 2017/02/28 02:54:32, Fady Samuel wrote: > For SurfaceInfo ParamTraits, we currently use macros: > ...
3 years, 9 months ago (2017-02-28 21:27:50 UTC) #21
Alex Z.
On 2017/02/28 17:52:02, Tom Sepez wrote: > lgtm > > https://codereview.chromium.org/2720503008/diff/20001/cc/ipc/surface_info_struct_traits.h > File cc/ipc/surface_info_struct_traits.h (right): ...
3 years, 9 months ago (2017-02-28 21:28:28 UTC) #22
Tom Sepez
lgtm
3 years, 9 months ago (2017-03-01 18:44:09 UTC) #34
Fady Samuel
lgtm
3 years, 9 months ago (2017-03-01 18:44:55 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2720503008/80001
3 years, 9 months ago (2017-03-01 18:59:16 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/375807)
3 years, 9 months ago (2017-03-01 19:09:22 UTC) #40
Alex Z.
pdr@: Please review changes in WebKit
3 years, 9 months ago (2017-03-01 19:12:18 UTC) #42
pdr.
On 2017/03/01 at 19:12:18, staraz wrote: > pdr@: Please review changes in WebKit LGTM
3 years, 9 months ago (2017-03-01 19:16:01 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2720503008/80001
3 years, 9 months ago (2017-03-01 19:34:27 UTC) #45
commit-bot: I haz the power
3 years, 9 months ago (2017-03-01 19:41:16 UTC) #48
Message was sent while issue was closed.
Committed patchset #4 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/9afc576bd3e06d83d6abc8700002...

Powered by Google App Engine
This is Rietveld 408576698