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

Unified Diff: Source/WebCore/platform/graphics/chromium/cc/CCRenderPass.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/CCRenderPass.cpp
===================================================================
--- Source/WebCore/platform/graphics/chromium/cc/CCRenderPass.cpp (revision 114754)
+++ Source/WebCore/platform/graphics/chromium/cc/CCRenderPass.cpp (working copy)
@@ -27,12 +27,14 @@
#include "cc/CCRenderPass.h"
+#include "Color.h"
#include "cc/CCDamageTracker.h"
#include "cc/CCDebugBorderDrawQuad.h"
#include "cc/CCLayerImpl.h"
#include "cc/CCQuadCuller.h"
#include "cc/CCRenderSurfaceDrawQuad.h"
#include "cc/CCSharedQuadState.h"
+#include "cc/CCSolidColorDrawQuad.h"
namespace WebCore {
@@ -88,4 +90,23 @@
m_sharedQuadStateList.append(sharedQuadState.release());
}
+void CCRenderPass::appendQuadsToFillScreen(CCLayerImpl* rootLayer, const Color& screenBackgroundColor, const CCOcclusionTrackerImpl& occlusionTracker)
+{
+ if (!rootLayer || !screenBackgroundColor.isValid())
+ return;
+
+ Region fillRegion = occlusionTracker.computeVisibleRegionInScreen();
+ if (fillRegion.isEmpty())
+ return;
+
+ OwnPtr<CCSharedQuadState> sharedQuadState = rootLayer->createSharedQuadState();
+ TransformationMatrix transformToLayerSpace = rootLayer->screenSpaceTransform().inverse();
+ Vector<IntRect> fillRects = fillRegion.rects();
+ for (size_t i = 0; i < fillRects.size(); ++i) {
+ IntRect layerRect = transformToLayerSpace.mapRect(fillRects[i]);
+ m_quadList.append(CCSolidColorDrawQuad::create(sharedQuadState.get(), layerRect, screenBackgroundColor));
+ }
+ m_sharedQuadStateList.append(sharedQuadState.release());
}
+
+}

Powered by Google App Engine
This is Rietveld 408576698