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

Side by Side Diff: WebCore/rendering/RenderLayerCompositor.h

Issue 5523003: Part 1 of merges for Chromium bug #64589... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/597/
Patch Set: Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « WebCore/rendering/RenderLayerBacking.cpp ('k') | WebCore/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution. 11 * documentation and/or other materials provided with the distribution.
12 * 12 *
13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 15 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 17 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 18 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 19 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY 20 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef RenderLayerCompositor_h 26 #ifndef RenderLayerCompositor_h
27 #define RenderLayerCompositor_h 27 #define RenderLayerCompositor_h
28 28
29 #include "ChromeClient.h"
29 #include "RenderLayer.h" 30 #include "RenderLayer.h"
30 #include "RenderLayerBacking.h" 31 #include "RenderLayerBacking.h"
31 32
32 namespace WebCore { 33 namespace WebCore {
33 34
34 #define PROFILE_LAYER_REBUILD 0 35 #define PROFILE_LAYER_REBUILD 0
35 36
36 class GraphicsLayer; 37 class GraphicsLayer;
37 class RenderEmbeddedObject; 38 class RenderEmbeddedObject;
38 class RenderIFrame; 39 class RenderIFrame;
(...skipping 21 matching lines...) Expand all
60 61
61 // Return true if this RenderView is in "compositing mode" (i.e. has one or more 62 // Return true if this RenderView is in "compositing mode" (i.e. has one or more
62 // composited RenderLayers) 63 // composited RenderLayers)
63 bool inCompositingMode() const { return m_compositing; } 64 bool inCompositingMode() const { return m_compositing; }
64 // This will make a compositing layer at the root automatically, and hook up to 65 // This will make a compositing layer at the root automatically, and hook up to
65 // the native view/window system. 66 // the native view/window system.
66 void enableCompositingMode(bool enable = true); 67 void enableCompositingMode(bool enable = true);
67 68
68 // Returns true if the accelerated compositing is enabled 69 // Returns true if the accelerated compositing is enabled
69 bool hasAcceleratedCompositing() const { return m_hasAcceleratedCompositing; } 70 bool hasAcceleratedCompositing() const { return m_hasAcceleratedCompositing; }
70 71
72 bool canRender3DTransforms() const;
73
71 bool showDebugBorders() const { return m_showDebugBorders; } 74 bool showDebugBorders() const { return m_showDebugBorders; }
72 bool showRepaintCounter() const { return m_showRepaintCounter; } 75 bool showRepaintCounter() const { return m_showRepaintCounter; }
73 76
74 // Copy the accelerated compositing related flags from Settings 77 // Copy the accelerated compositing related flags from Settings
75 void cacheAcceleratedCompositingFlags(); 78 void cacheAcceleratedCompositingFlags();
76 79
77 // Called when the layer hierarchy needs to be updated (compositing layers h ave been 80 // Called when the layer hierarchy needs to be updated (compositing layers h ave been
78 // created, destroyed or re-parented). 81 // created, destroyed or re-parented).
79 void setCompositingLayersNeedRebuild(bool needRebuild = true); 82 void setCompositingLayersNeedRebuild(bool needRebuild = true);
80 bool compositingLayersNeedRebuild() const { return m_compositingLayersNeedRe build; } 83 bool compositingLayersNeedRebuild() const { return m_compositingLayersNeedRe build; }
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 bool requiresCompositingWhenDescendantsAreCompositing(RenderObject*) const; 228 bool requiresCompositingWhenDescendantsAreCompositing(RenderObject*) const;
226 229
227 bool requiresScrollLayer(RootLayerAttachment) const; 230 bool requiresScrollLayer(RootLayerAttachment) const;
228 231
229 private: 232 private:
230 RenderView* m_renderView; 233 RenderView* m_renderView;
231 OwnPtr<GraphicsLayer> m_rootPlatformLayer; 234 OwnPtr<GraphicsLayer> m_rootPlatformLayer;
232 Timer<RenderLayerCompositor> m_updateCompositingLayersTimer; 235 Timer<RenderLayerCompositor> m_updateCompositingLayersTimer;
233 236
234 bool m_hasAcceleratedCompositing; 237 bool m_hasAcceleratedCompositing;
238 ChromeClient::CompositingTriggerFlags m_compositingTriggers;
239
235 bool m_showDebugBorders; 240 bool m_showDebugBorders;
236 bool m_showRepaintCounter; 241 bool m_showRepaintCounter;
237 bool m_compositingConsultsOverlap; 242 bool m_compositingConsultsOverlap;
238 243
239 // When true, we have to wait until layout has happened before we can decide whether to enter compositing mode, 244 // When true, we have to wait until layout has happened before we can decide whether to enter compositing mode,
240 // because only then do we know the final size of plugins and iframes. 245 // because only then do we know the final size of plugins and iframes.
241 // FIXME: once set, this is never cleared. 246 // FIXME: once set, this is never cleared.
242 mutable bool m_compositingDependsOnGeometry; 247 mutable bool m_compositingDependsOnGeometry;
243 248
244 bool m_compositing; 249 bool m_compositing;
245 bool m_compositingLayersNeedRebuild; 250 bool m_compositingLayersNeedRebuild;
246 251
247 RootLayerAttachment m_rootLayerAttachment; 252 RootLayerAttachment m_rootLayerAttachment;
248 253
249 // Enclosing clipping layer for iframe content 254 // Enclosing clipping layer for iframe content
250 OwnPtr<GraphicsLayer> m_clipLayer; 255 OwnPtr<GraphicsLayer> m_clipLayer;
251 OwnPtr<GraphicsLayer> m_scrollLayer; 256 OwnPtr<GraphicsLayer> m_scrollLayer;
252 257
253 #if PROFILE_LAYER_REBUILD 258 #if PROFILE_LAYER_REBUILD
254 int m_rootLayerUpdateCount; 259 int m_rootLayerUpdateCount;
255 #endif 260 #endif
256 }; 261 };
257 262
258 263
259 } // namespace WebCore 264 } // namespace WebCore
260 265
261 #endif // RenderLayerCompositor_h 266 #endif // RenderLayerCompositor_h
OLDNEW
« no previous file with comments | « WebCore/rendering/RenderLayerBacking.cpp ('k') | WebCore/rendering/RenderLayerCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698