| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. | 3 * Copyright (C) 2013 Intel Corporation. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 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 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 class FloatRect; | 59 class FloatRect; |
| 60 class Image; | 60 class Image; |
| 61 class LinkHighlight; | 61 class LinkHighlight; |
| 62 class JSONObject; | 62 class JSONObject; |
| 63 class PaintController; | 63 class PaintController; |
| 64 class ScrollableArea; | 64 class ScrollableArea; |
| 65 class WebLayer; | 65 class WebLayer; |
| 66 | 66 |
| 67 typedef Vector<GraphicsLayer*, 64> GraphicsLayerVector; | 67 typedef Vector<GraphicsLayer*, 64> GraphicsLayerVector; |
| 68 | 68 |
| 69 struct NeedsDisplayRecord { |
| 70 IntRect r; |
| 71 PaintInvalidationReason invalidationReason; |
| 72 const DisplayItemClient& client; |
| 73 }; |
| 74 |
| 69 // GraphicsLayer is an abstraction for a rendering surface with backing store, | 75 // GraphicsLayer is an abstraction for a rendering surface with backing store, |
| 70 // which may have associated transformation and animations. | 76 // which may have associated transformation and animations. |
| 71 | 77 |
| 72 class PLATFORM_EXPORT GraphicsLayer : public WebLayerScrollClient, public cc::La
yerClient, public DisplayItemClient { | 78 class PLATFORM_EXPORT GraphicsLayer : public WebLayerScrollClient, public cc::La
yerClient, public DisplayItemClient { |
| 73 WTF_MAKE_NONCOPYABLE(GraphicsLayer); USING_FAST_MALLOC(GraphicsLayer); | 79 WTF_MAKE_NONCOPYABLE(GraphicsLayer); USING_FAST_MALLOC(GraphicsLayer); |
| 74 public: | 80 public: |
| 75 static PassOwnPtr<GraphicsLayer> create(GraphicsLayerClient*); | 81 static PassOwnPtr<GraphicsLayer> create(GraphicsLayerClient*); |
| 76 | 82 |
| 77 ~GraphicsLayer() override; | 83 ~GraphicsLayer() override; |
| 78 | 84 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 void setBackdropFilters(const FilterOperations&); | 181 void setBackdropFilters(const FilterOperations&); |
| 176 | 182 |
| 177 void setFilterQuality(SkFilterQuality); | 183 void setFilterQuality(SkFilterQuality); |
| 178 | 184 |
| 179 // Some GraphicsLayers paint only the foreground or the background content | 185 // Some GraphicsLayers paint only the foreground or the background content |
| 180 GraphicsLayerPaintingPhase paintingPhase() const { return m_paintingPhase; } | 186 GraphicsLayerPaintingPhase paintingPhase() const { return m_paintingPhase; } |
| 181 void setPaintingPhase(GraphicsLayerPaintingPhase); | 187 void setPaintingPhase(GraphicsLayerPaintingPhase); |
| 182 | 188 |
| 183 void setNeedsDisplay(); | 189 void setNeedsDisplay(); |
| 184 // Mark the given rect (in layer coords) as needing display. Never goes deep
. | 190 // Mark the given rect (in layer coords) as needing display. Never goes deep
. |
| 185 void setNeedsDisplayInRect(const IntRect&, PaintInvalidationReason, const Di
splayItemClient&); | 191 void setNeedsDisplayInRect(const Vector<NeedsDisplayRecord>& rects); |
| 186 | 192 |
| 187 void setContentsNeedsDisplay(); | 193 void setContentsNeedsDisplay(); |
| 188 | 194 |
| 189 void invalidateDisplayItemClient(const DisplayItemClient&, PaintInvalidation
Reason); | 195 void invalidateDisplayItemClient(const DisplayItemClient&, PaintInvalidation
Reason); |
| 190 | 196 |
| 191 // Set that the position/size of the contents (image or video). | 197 // Set that the position/size of the contents (image or video). |
| 192 void setContentsRect(const IntRect&); | 198 void setContentsRect(const IntRect&); |
| 193 | 199 |
| 194 // Layer contents | 200 // Layer contents |
| 195 void setContentsToImage(Image*, RespectImageOrientationEnum = DoNotRespectIm
ageOrientation); | 201 void setContentsToImage(Image*, RespectImageOrientationEnum = DoNotRespectIm
ageOrientation); |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 }; | 372 }; |
| 367 | 373 |
| 368 } // namespace blink | 374 } // namespace blink |
| 369 | 375 |
| 370 #ifndef NDEBUG | 376 #ifndef NDEBUG |
| 371 // Outside the blink namespace for ease of invocation from gdb. | 377 // Outside the blink namespace for ease of invocation from gdb. |
| 372 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); | 378 void PLATFORM_EXPORT showGraphicsLayerTree(const blink::GraphicsLayer*); |
| 373 #endif | 379 #endif |
| 374 | 380 |
| 375 #endif // GraphicsLayer_h | 381 #endif // GraphicsLayer_h |
| OLD | NEW |