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

Unified Diff: Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp

Issue 10146014: Merge 113677 - [chromium] Viewport is not filled when out of texture memory on mac (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 8 months 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 side-by-side diff with in-line comments
Download patch
Index: Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp (revision 114754)
+++ Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp (working copy)
@@ -50,7 +50,6 @@
, m_scrollable(false)
, m_shouldScrollOnMainThread(false)
, m_haveWheelEventHandlers(false)
- , m_backgroundCoversViewport(false)
, m_doubleSided(true)
, m_layerPropertyChanged(false)
, m_masksToBounds(false)
@@ -136,43 +135,6 @@
return CCSharedQuadState::create(quadTransform(), drawTransform(), visibleLayerRect(), layerClipRect, drawOpacity(), opaque());
}
-void CCLayerImpl::appendQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState, bool&)
-{
- appendGutterQuads(quadList, sharedQuadState);
-}
-
-void CCLayerImpl::appendGutterQuads(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState)
-{
- if (!backgroundCoversViewport() || !backgroundColor().isValid())
- return;
-
- const IntRect& layerRect = visibleLayerRect();
- IntRect clip = screenSpaceTransform().inverse().mapRect(clipRect());
-
- if (layerRect.isEmpty()) {
- quadList.append(CCSolidColorDrawQuad::create(sharedQuadState, clip, backgroundColor()));
- return;
- }
-
- IntRect gutterRects[4];
- for (int i = 0; i < 4; i++)
- gutterRects[i] = clip;
- gutterRects[0].shiftMaxYEdgeTo(layerRect.y());
- gutterRects[1].shiftYEdgeTo(layerRect.maxY());
- gutterRects[2].shiftMaxXEdgeTo(layerRect.x());
- gutterRects[3].shiftXEdgeTo(layerRect.maxX());
-
- gutterRects[2].shiftYEdgeTo(layerRect.y());
- gutterRects[3].shiftYEdgeTo(layerRect.y());
- gutterRects[2].shiftMaxYEdgeTo(layerRect.maxY());
- gutterRects[3].shiftMaxYEdgeTo(layerRect.maxY());
-
- for (int i = 0; i < 4; i++) {
- if (!gutterRects[i].isEmpty())
- quadList.append(CCSolidColorDrawQuad::create(sharedQuadState, gutterRects[i], backgroundColor()));
- }
-}
-
void CCLayerImpl::appendDebugBorderQuad(CCQuadCuller& quadList, const CCSharedQuadState* sharedQuadState) const
{
if (!hasDebugBorders())
@@ -392,15 +354,6 @@
m_layerPropertyChanged = true;
}
-void CCLayerImpl::setBackgroundCoversViewport(bool backgroundCoversViewport)
-{
- if (m_backgroundCoversViewport == backgroundCoversViewport)
- return;
-
- m_backgroundCoversViewport = backgroundCoversViewport;
- m_layerPropertyChanged = true;
-}
-
void CCLayerImpl::setFilters(const FilterOperations& filters)
{
if (m_filters == filters)
@@ -552,6 +505,13 @@
noteLayerPropertyChangedForSubtree();
}
+Region CCLayerImpl::visibleContentOpaqueRegion() const
+{
+ if (opaque())
+ return visibleLayerRect();
+ return Region();
+}
+
void CCLayerImpl::didLoseContext()
{
}

Powered by Google App Engine
This is Rietveld 408576698