Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 2 | * vim: sw=2 ts=8 et : |
michael@0 | 3 | */ |
michael@0 | 4 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 5 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 6 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 7 | |
michael@0 | 8 | include protocol PBrowser; |
michael@0 | 9 | include protocol PLayerTransaction; |
michael@0 | 10 | |
michael@0 | 11 | |
michael@0 | 12 | using class nsRegion from "nsRegion.h"; |
michael@0 | 13 | |
michael@0 | 14 | namespace mozilla { |
michael@0 | 15 | namespace layout { |
michael@0 | 16 | |
michael@0 | 17 | /** |
michael@0 | 18 | * PRenderFrame (in the layout sense of "frame") represents one web |
michael@0 | 19 | * "page". It's used to graft content processes' layer trees into |
michael@0 | 20 | * chrome's rendering path. The lifetime of a PRenderFrame is tied to |
michael@0 | 21 | * its PresShell in the child process. |
michael@0 | 22 | * |
michael@0 | 23 | * The child process conceptually "owns" a PRenderFrame, because it |
michael@0 | 24 | * only makes sense wrt documents loaded by the child. |
michael@0 | 25 | */ |
michael@0 | 26 | sync protocol PRenderFrame |
michael@0 | 27 | { |
michael@0 | 28 | manager PBrowser; |
michael@0 | 29 | manages PLayerTransaction; |
michael@0 | 30 | |
michael@0 | 31 | parent: |
michael@0 | 32 | /** |
michael@0 | 33 | * Shadow layer trees can be grafted into the parent's in one of |
michael@0 | 34 | * two ways |
michael@0 | 35 | * - direct shadow tree: updates are sent to parent |
michael@0 | 36 | * - indirect: the parent holds a reference (ID) to a shadow tree |
michael@0 | 37 | * that's managed by the compositor. During composition, the |
michael@0 | 38 | * shadow tree is looked up and grafted appropriately |
michael@0 | 39 | * |
michael@0 | 40 | * |id| is set to 0 in the "direct" case, and to a whole number |
michael@0 | 41 | * in the "indirect" case. |
michael@0 | 42 | */ |
michael@0 | 43 | async PLayerTransaction(); |
michael@0 | 44 | |
michael@0 | 45 | async NotifyCompositorTransaction(); |
michael@0 | 46 | |
michael@0 | 47 | async UpdateHitRegion(nsRegion aRegion); |
michael@0 | 48 | |
michael@0 | 49 | async __delete__(); |
michael@0 | 50 | |
michael@0 | 51 | state EMPTY_OR_DIRECT_COMPOSITOR: |
michael@0 | 52 | recv PLayerTransaction goto HAVE_CONTENT; |
michael@0 | 53 | recv NotifyCompositorTransaction goto EMPTY_OR_DIRECT_COMPOSITOR; |
michael@0 | 54 | recv UpdateHitRegion goto EMPTY_OR_DIRECT_COMPOSITOR; |
michael@0 | 55 | recv __delete__; |
michael@0 | 56 | |
michael@0 | 57 | state HAVE_CONTENT: |
michael@0 | 58 | recv NotifyCompositorTransaction goto HAVE_CONTENT; |
michael@0 | 59 | recv UpdateHitRegion goto HAVE_CONTENT; |
michael@0 | 60 | recv __delete__; |
michael@0 | 61 | }; |
michael@0 | 62 | |
michael@0 | 63 | } // namespace layout |
michael@0 | 64 | } // namespace mozilla |