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

Side by Side Diff: cc/CCLayerTreeHostImpl.cpp

Issue 10919320: Integrate r128344 and r128253 from WebKit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test build break Created 8 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « cc/CCLayerTreeHostImpl.h ('k') | cc/CCLayerTreeHostImplTest.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 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "CCLayerTreeHostImpl.h" 7 #include "CCLayerTreeHostImpl.h"
8 8
9 #include "CCAppendQuadsData.h" 9 #include "CCAppendQuadsData.h"
10 #include "CCDamageTracker.h" 10 #include "CCDamageTracker.h"
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 return false; 493 return false;
494 494
495 // If we return true, then we expect drawLayers() to be called before this f unction is called again. 495 // If we return true, then we expect drawLayers() to be called before this f unction is called again.
496 return true; 496 return true;
497 } 497 }
498 498
499 void CCLayerTreeHostImpl::releaseContentsTextures() 499 void CCLayerTreeHostImpl::releaseContentsTextures()
500 { 500 {
501 if (m_contentsTexturesPurged) 501 if (m_contentsTexturesPurged)
502 return; 502 return;
503 m_resourceProvider->deleteOwnedResources(CCRenderer::ContentPool); 503 m_client->releaseContentsTexturesOnImplThread();
504 m_contentsTexturesPurged = true; 504 setContentsTexturesPurged();
505 m_client->setNeedsCommitOnImplThread(); 505 m_client->setNeedsCommitOnImplThread();
506 m_client->onCanDrawStateChanged(canDraw()); 506 m_client->onCanDrawStateChanged(canDraw());
507 } 507 }
508 508
509 void CCLayerTreeHostImpl::setMemoryAllocationLimitBytes(size_t bytes) 509 void CCLayerTreeHostImpl::setMemoryAllocationLimitBytes(size_t bytes)
510 { 510 {
511 if (m_memoryAllocationLimitBytes == bytes) 511 if (m_memoryAllocationLimitBytes == bytes)
512 return; 512 return;
513 m_memoryAllocationLimitBytes = bytes; 513 m_memoryAllocationLimitBytes = bytes;
514 514
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 m_context = contextRef.release(); 705 m_context = contextRef.release();
706 706
707 if (!m_visible && m_renderer) 707 if (!m_visible && m_renderer)
708 m_renderer->setVisible(m_visible); 708 m_renderer->setVisible(m_visible);
709 709
710 m_client->onCanDrawStateChanged(canDraw()); 710 m_client->onCanDrawStateChanged(canDraw());
711 711
712 return m_renderer; 712 return m_renderer;
713 } 713 }
714 714
715 void CCLayerTreeHostImpl::setContentsTexturesPurged()
716 {
717 m_contentsTexturesPurged = true;
718 m_client->onCanDrawStateChanged(canDraw());
719 }
720
715 void CCLayerTreeHostImpl::resetContentsTexturesPurged() 721 void CCLayerTreeHostImpl::resetContentsTexturesPurged()
716 { 722 {
717 m_contentsTexturesPurged = false; 723 m_contentsTexturesPurged = false;
718 m_client->onCanDrawStateChanged(canDraw()); 724 m_client->onCanDrawStateChanged(canDraw());
719 } 725 }
720 726
721 void CCLayerTreeHostImpl::setViewportSize(const IntSize& layoutViewportSize, con st IntSize& deviceViewportSize) 727 void CCLayerTreeHostImpl::setViewportSize(const IntSize& layoutViewportSize, con st IntSize& deviceViewportSize)
722 { 728 {
723 if (layoutViewportSize == m_layoutViewportSize && deviceViewportSize == m_de viceViewportSize) 729 if (layoutViewportSize == m_layoutViewportSize && deviceViewportSize == m_de viceViewportSize)
724 return; 730 return;
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 1269
1264 CCScrollbarAnimationController* scrollbarController = layer->scrollbarAnimat ionController(); 1270 CCScrollbarAnimationController* scrollbarController = layer->scrollbarAnimat ionController();
1265 if (scrollbarController && scrollbarController->animate(monotonicTime)) 1271 if (scrollbarController && scrollbarController->animate(monotonicTime))
1266 m_client->setNeedsRedrawOnImplThread(); 1272 m_client->setNeedsRedrawOnImplThread();
1267 1273
1268 for (size_t i = 0; i < layer->children().size(); ++i) 1274 for (size_t i = 0; i < layer->children().size(); ++i)
1269 animateScrollbarsRecursive(layer->children()[i].get(), monotonicTime); 1275 animateScrollbarsRecursive(layer->children()[i].get(), monotonicTime);
1270 } 1276 }
1271 1277
1272 } // namespace cc 1278 } // namespace cc
OLDNEW
« no previous file with comments | « cc/CCLayerTreeHostImpl.h ('k') | cc/CCLayerTreeHostImplTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698