OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 unoccludedInTarget = computeUnoccludedContentRect(contentRect, contentTo
TargetSurfaceTransform<LayerType>(layer), layerScissorRectInTargetSurface(layer)
, m_stack.last().occlusionInTarget); | 333 unoccludedInTarget = computeUnoccludedContentRect(contentRect, contentTo
TargetSurfaceTransform<LayerType>(layer), layerScissorRectInTargetSurface(layer)
, m_stack.last().occlusionInTarget); |
334 | 334 |
335 return intersection(unoccludedInScreen, unoccludedInTarget); | 335 return intersection(unoccludedInScreen, unoccludedInTarget); |
336 } | 336 } |
337 | 337 |
338 template<typename LayerType, typename RenderSurfaceType> | 338 template<typename LayerType, typename RenderSurfaceType> |
339 IntRect CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::layerScissorRectIn
TargetSurface(const LayerType* layer) const | 339 IntRect CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::layerScissorRectIn
TargetSurface(const LayerType* layer) const |
340 { | 340 { |
341 const RenderSurfaceType* targetSurface = m_stack.last().surface; | 341 const RenderSurfaceType* targetSurface = m_stack.last().surface; |
342 FloatRect totalScissor = targetSurface->contentRect(); | 342 FloatRect totalScissor = targetSurface->contentRect(); |
343 // FIXME: layer->clipRect() and layer->usesLayerClipping() is changing: http
s://bugs.webkit.org/show_bug.cgi?id=80622 | 343 if (layer->usesLayerClipping()) |
344 if (!layer->clipRect().isEmpty()) | |
345 totalScissor.intersect(layer->clipRect()); | 344 totalScissor.intersect(layer->clipRect()); |
346 return enclosingIntRect(totalScissor); | 345 return enclosingIntRect(totalScissor); |
347 } | 346 } |
348 | 347 |
349 template<typename LayerType, typename RenderSurfaceType> | 348 template<typename LayerType, typename RenderSurfaceType> |
350 const Region& CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::currentOcclu
sionInScreenSpace() const | 349 const Region& CCOcclusionTrackerBase<LayerType, RenderSurfaceType>::currentOcclu
sionInScreenSpace() const |
351 { | 350 { |
352 ASSERT(!m_stack.isEmpty()); | 351 ASSERT(!m_stack.isEmpty()); |
353 return m_stack.last().occlusionInScreen; | 352 return m_stack.last().occlusionInScreen; |
354 } | 353 } |
(...skipping 25 matching lines...) Expand all Loading... |
380 template void CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::markOccluded
BehindLayer(const CCLayerImpl*); | 379 template void CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::markOccluded
BehindLayer(const CCLayerImpl*); |
381 template bool CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::occluded(con
st CCLayerImpl*, const IntRect& contentRect) const; | 380 template bool CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::occluded(con
st CCLayerImpl*, const IntRect& contentRect) const; |
382 template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::unocclude
dContentRect(const CCLayerImpl*, const IntRect& contentRect) const; | 381 template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::unocclude
dContentRect(const CCLayerImpl*, const IntRect& contentRect) const; |
383 template const Region& CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::cur
rentOcclusionInScreenSpace() const; | 382 template const Region& CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::cur
rentOcclusionInScreenSpace() const; |
384 template const Region& CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::cur
rentOcclusionInTargetSurface() const; | 383 template const Region& CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::cur
rentOcclusionInTargetSurface() const; |
385 template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::layerScis
sorRectInTargetSurface(const CCLayerImpl*) const; | 384 template IntRect CCOcclusionTrackerBase<CCLayerImpl, CCRenderSurface>::layerScis
sorRectInTargetSurface(const CCLayerImpl*) const; |
386 | 385 |
387 | 386 |
388 } // namespace WebCore | 387 } // namespace WebCore |
389 #endif // USE(ACCELERATED_COMPOSITING) | 388 #endif // USE(ACCELERATED_COMPOSITING) |
OLD | NEW |