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

Side by Side Diff: Source/core/rendering/RenderLayerClipper.cpp

Issue 88863002: Land layer squashing behind a flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: removed bogus asserts Created 7 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderLayerCompositor.h » ('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) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
3 * 3 *
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation.
5 * 5 *
6 * Other contributors: 6 * Other contributors:
7 * Robert O'Callahan <roc+@cs.cmu.edu> 7 * Robert O'Callahan <roc+@cs.cmu.edu>
8 * David Baron <dbaron@fas.harvard.edu> 8 * David Baron <dbaron@fas.harvard.edu>
9 * Christian Biesinger <cbiesinger@web.de> 9 * Christian Biesinger <cbiesinger@web.de>
10 * Randall Jesup <rjesup@wgate.com> 10 * Randall Jesup <rjesup@wgate.com>
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #include "core/rendering/RenderLayer.h" 47 #include "core/rendering/RenderLayer.h"
48 #include "core/rendering/RenderView.h" 48 #include "core/rendering/RenderView.h"
49 49
50 namespace WebCore { 50 namespace WebCore {
51 51
52 void RenderLayerClipper::updateClipRects(const ClipRectsContext& clipRectsContex t) 52 void RenderLayerClipper::updateClipRects(const ClipRectsContext& clipRectsContex t)
53 { 53 {
54 ClipRectsType clipRectsType = clipRectsContext.clipRectsType; 54 ClipRectsType clipRectsType = clipRectsContext.clipRectsType;
55 ASSERT(clipRectsType < NumCachedClipRectsTypes); 55 ASSERT(clipRectsType < NumCachedClipRectsTypes);
56 if (m_clipRectsCache && m_clipRectsCache->getClipRects(clipRectsType, clipRe ctsContext.respectOverflowClip)) { 56 if (m_clipRectsCache && m_clipRectsCache->getClipRects(clipRectsType, clipRe ctsContext.respectOverflowClip)) {
57 // FIXME: these asserts trigger for squashing. Need to update this code to support squashing as appropriate.
57 ASSERT(clipRectsContext.rootLayer == m_clipRectsCache->m_clipRectsRoot[c lipRectsType]); 58 ASSERT(clipRectsContext.rootLayer == m_clipRectsCache->m_clipRectsRoot[c lipRectsType]);
58 ASSERT(m_clipRectsCache->m_scrollbarRelevancy[clipRectsType] == clipRect sContext.overlayScrollbarSizeRelevancy); 59 ASSERT(m_clipRectsCache->m_scrollbarRelevancy[clipRectsType] == clipRect sContext.overlayScrollbarSizeRelevancy);
59 60
60 #ifdef CHECK_CACHED_CLIP_RECTS 61 #ifdef CHECK_CACHED_CLIP_RECTS
61 // This code is useful to check cached clip rects, but is too expensive to leave enabled in debug builds by default. 62 // This code is useful to check cached clip rects, but is too expensive to leave enabled in debug builds by default.
62 ClipRectsContext tempContext(clipRectsContext); 63 ClipRectsContext tempContext(clipRectsContext);
63 tempContext.clipRectsType = TemporaryClipRects; 64 tempContext.clipRectsType = TemporaryClipRects;
64 ClipRects clipRects; 65 ClipRects clipRects;
65 calculateClipRects(tempContext, clipRects); 66 calculateClipRects(tempContext, clipRects);
66 ASSERT(clipRects == *m_clipRectsCache->getClipRects(clipRectsType, clipR ectsContext.respectOverflowClip).get()); 67 ASSERT(clipRects == *m_clipRectsCache->getClipRects(clipRectsType, clipR ectsContext.respectOverflowClip).get());
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 if (m_renderer->hasClip()) { 182 if (m_renderer->hasClip()) {
182 LayoutRect newPosClip = toRenderBox(m_renderer)->clipRect(offset, cl ipRectsContext.region); 183 LayoutRect newPosClip = toRenderBox(m_renderer)->clipRect(offset, cl ipRectsContext.region);
183 clipRects.setPosClipRect(intersection(newPosClip, clipRects.posClipR ect())); 184 clipRects.setPosClipRect(intersection(newPosClip, clipRects.posClipR ect()));
184 clipRects.setOverflowClipRect(intersection(newPosClip, clipRects.ove rflowClipRect())); 185 clipRects.setOverflowClipRect(intersection(newPosClip, clipRects.ove rflowClipRect()));
185 clipRects.setFixedClipRect(intersection(newPosClip, clipRects.fixedC lipRect())); 186 clipRects.setFixedClipRect(intersection(newPosClip, clipRects.fixedC lipRect()));
186 } 187 }
187 } 188 }
188 } 189 }
189 190
190 } // namespace WebCore 191 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | Source/core/rendering/RenderLayerCompositor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698