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

Side by Side Diff: Source/WebKit/chromium/src/NonCompositedContentHost.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 unified diff | Download patch
« no previous file with comments | « Source/WebKit/chromium/ChangeLog ('k') | Source/WebKit/chromium/src/WebLayerTreeView.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 28 matching lines...) Expand all
39 NonCompositedContentHost::NonCompositedContentHost(PassOwnPtr<WebCore::LayerPain terChromium> contentPaint) 39 NonCompositedContentHost::NonCompositedContentHost(PassOwnPtr<WebCore::LayerPain terChromium> contentPaint)
40 : m_contentPaint(contentPaint) 40 : m_contentPaint(contentPaint)
41 , m_showDebugBorders(false) 41 , m_showDebugBorders(false)
42 { 42 {
43 m_graphicsLayer = WebCore::GraphicsLayer::create(this); 43 m_graphicsLayer = WebCore::GraphicsLayer::create(this);
44 #ifndef NDEBUG 44 #ifndef NDEBUG
45 m_graphicsLayer->setName("non-composited content"); 45 m_graphicsLayer->setName("non-composited content");
46 #endif 46 #endif
47 m_graphicsLayer->setDrawsContent(true); 47 m_graphicsLayer->setDrawsContent(true);
48 m_graphicsLayer->platformLayer()->setIsNonCompositedContent(true); 48 m_graphicsLayer->platformLayer()->setIsNonCompositedContent(true);
49 #if !ENABLE(RUBBER_BANDING)
50 m_graphicsLayer->platformLayer()->setBackgroundCoversViewport(true);
51 #endif
52 m_graphicsLayer->platformLayer()->setOpaque(true); 49 m_graphicsLayer->platformLayer()->setOpaque(true);
53 } 50 }
54 51
55 NonCompositedContentHost::~NonCompositedContentHost() 52 NonCompositedContentHost::~NonCompositedContentHost()
56 { 53 {
57 } 54 }
58 55
59 void NonCompositedContentHost::setBackgroundColor(const WebCore::Color& color) 56 void NonCompositedContentHost::setBackgroundColor(const WebCore::Color& color)
60 { 57 {
61 if (color.isValid()) 58 m_graphicsLayer->platformLayer()->setBackgroundColor(color);
62 m_graphicsLayer->platformLayer()->setBackgroundColor(color);
63 else
64 m_graphicsLayer->platformLayer()->setBackgroundColor(WebCore::Color::whi te);
65 } 59 }
66 60
67 void NonCompositedContentHost::setScrollLayer(WebCore::GraphicsLayer* layer) 61 void NonCompositedContentHost::setScrollLayer(WebCore::GraphicsLayer* layer)
68 { 62 {
69 m_graphicsLayer->setNeedsDisplay(); 63 m_graphicsLayer->setNeedsDisplay();
70 64
71 if (!layer) { 65 if (!layer) {
72 m_graphicsLayer->removeFromParent(); 66 m_graphicsLayer->removeFromParent();
73 m_graphicsLayer->platformLayer()->setLayerTreeHost(0); 67 m_graphicsLayer->platformLayer()->setLayerTreeHost(0);
74 return; 68 return;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 { 173 {
180 return m_showDebugBorders; 174 return m_showDebugBorders;
181 } 175 }
182 176
183 bool NonCompositedContentHost::showRepaintCounter(const WebCore::GraphicsLayer*) const 177 bool NonCompositedContentHost::showRepaintCounter(const WebCore::GraphicsLayer*) const
184 { 178 {
185 return false; 179 return false;
186 } 180 }
187 181
188 } // namespace WebKit 182 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/ChangeLog ('k') | Source/WebKit/chromium/src/WebLayerTreeView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698