| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| 11 * notice, this list of conditions and the following disclaimer in the | 11 * notice, this list of conditions and the following disclaimer in the |
| 12 * documentation and/or other materials provided with the distribution. | 12 * documentation and/or other materials provided with the distribution. |
| 13 * | 13 * |
| 14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY | 14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY |
| 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY | 17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY |
| 18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | 20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
| 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef WebLayer_h | 26 #ifndef WebLayer_h |
| 27 #define WebLayer_h | 27 #define WebLayer_h |
| 28 | 28 |
| 29 #include "cc/layers/layer.h" |
| 30 |
| 29 #include "WebBlendMode.h" | 31 #include "WebBlendMode.h" |
| 30 #include "WebColor.h" | 32 #include "WebColor.h" |
| 31 #include "WebCommon.h" | 33 #include "WebCommon.h" |
| 32 #include "WebFloatPoint.h" | 34 #include "WebFloatPoint.h" |
| 33 #include "WebFloatPoint3D.h" | 35 #include "WebFloatPoint3D.h" |
| 34 #include "WebFloatSize.h" | 36 #include "WebFloatSize.h" |
| 35 #include "WebPoint.h" | 37 #include "WebPoint.h" |
| 36 #include "WebRect.h" | 38 #include "WebRect.h" |
| 37 #include "WebSize.h" | 39 #include "WebSize.h" |
| 38 #include "WebString.h" | 40 #include "WebString.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 51 | 53 |
| 52 class WebLayerScrollClient; | 54 class WebLayerScrollClient; |
| 53 struct WebFloatPoint; | 55 struct WebFloatPoint; |
| 54 struct WebLayerPositionConstraint; | 56 struct WebLayerPositionConstraint; |
| 55 struct WebLayerStickyPositionConstraint; | 57 struct WebLayerStickyPositionConstraint; |
| 56 | 58 |
| 57 class WebLayer { | 59 class WebLayer { |
| 58 public: | 60 public: |
| 59 virtual ~WebLayer() {} | 61 virtual ~WebLayer() {} |
| 60 | 62 |
| 63 static constexpr int kInvalidLayerId = cc::Layer::INVALID_ID; |
| 64 |
| 61 // Returns a positive ID that will be unique across all WebLayers allocated in | 65 // Returns a positive ID that will be unique across all WebLayers allocated in |
| 62 // this process. | 66 // this process. |
| 63 virtual int id() const = 0; | 67 virtual int id() const = 0; |
| 64 | 68 |
| 65 // Sets a region of the layer as invalid, i.e. needs to update its content. | 69 // Sets a region of the layer as invalid, i.e. needs to update its content. |
| 66 virtual void invalidateRect(const WebRect&) = 0; | 70 virtual void invalidateRect(const WebRect&) = 0; |
| 67 | 71 |
| 68 // Sets the entire layer as invalid, i.e. needs to update its content. | 72 // Sets the entire layer as invalid, i.e. needs to update its content. |
| 69 virtual void invalidate() = 0; | 73 virtual void invalidate() = 0; |
| 70 | 74 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 | 220 |
| 217 virtual void setCompositorMutableProperties(uint32_t) = 0; | 221 virtual void setCompositorMutableProperties(uint32_t) = 0; |
| 218 virtual uint32_t compositorMutableProperties() const = 0; | 222 virtual uint32_t compositorMutableProperties() const = 0; |
| 219 | 223 |
| 220 virtual void setHasWillChangeTransformHint(bool) = 0; | 224 virtual void setHasWillChangeTransformHint(bool) = 0; |
| 221 }; | 225 }; |
| 222 | 226 |
| 223 } // namespace blink | 227 } // namespace blink |
| 224 | 228 |
| 225 #endif // WebLayer_h | 229 #endif // WebLayer_h |
| OLD | NEW |