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

Side by Side Diff: cc/layer_tree_host_impl.cc

Issue 12022043: cc: Fix inappropriate use of term "texture". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: s/InitializeTile/UploadTile/ and s/CompletedSetPixels/CompletedTileUploads/ Created 7 years, 11 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/layer_tree_host_impl.h ('k') | cc/layer_tree_host_impl_unittest.cc » ('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 "cc/layer_tree_host_impl.h" 5 #include "cc/layer_tree_host_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 714
715 void LayerTreeHostImpl::ScheduleManageTiles() 715 void LayerTreeHostImpl::ScheduleManageTiles()
716 { 716 {
717 if (m_client) 717 if (m_client)
718 m_client->setNeedsManageTilesOnImplThread(); 718 m_client->setNeedsManageTilesOnImplThread();
719 } 719 }
720 720
721 void LayerTreeHostImpl::DidUploadVisibleHighResolutionTile() 721 void LayerTreeHostImpl::DidUploadVisibleHighResolutionTile()
722 { 722 {
723 if (m_client) 723 if (m_client)
724 m_client->didUploadVisibleHighResolutionTileOnImplTread(); 724 m_client->didUploadVisibleHighResolutionTileOnImplThread();
725 } 725 }
726 726
727 bool LayerTreeHostImpl::shouldClearRootRenderPass() const 727 bool LayerTreeHostImpl::shouldClearRootRenderPass() const
728 { 728 {
729 return m_settings.shouldClearRootRenderPass; 729 return m_settings.shouldClearRootRenderPass;
730 } 730 }
731 731
732 void LayerTreeHostImpl::setManagedMemoryPolicy(const ManagedMemoryPolicy& policy ) 732 void LayerTreeHostImpl::setManagedMemoryPolicy(const ManagedMemoryPolicy& policy )
733 { 733 {
734 if (m_managedMemoryPolicy == policy) 734 if (m_managedMemoryPolicy == policy)
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 return m_renderer->capabilities(); 847 return m_renderer->capabilities();
848 } 848 }
849 849
850 bool LayerTreeHostImpl::swapBuffers() 850 bool LayerTreeHostImpl::swapBuffers()
851 { 851 {
852 DCHECK(m_renderer); 852 DCHECK(m_renderer);
853 bool result = m_renderer->swapBuffers(); 853 bool result = m_renderer->swapBuffers();
854 854
855 if (m_settings.implSidePainting && 855 if (m_settings.implSidePainting &&
856 !activeTree()->AreVisibleResourcesReady()) { 856 !activeTree()->AreVisibleResourcesReady()) {
857 m_client->didSwapUseIncompleteTextureOnImplThread(); 857 m_client->didSwapUseIncompleteTileOnImplThread();
858 } 858 }
859 859
860 return result; 860 return result;
861 } 861 }
862 862
863 const gfx::Size& LayerTreeHostImpl::deviceViewportSize() const 863 const gfx::Size& LayerTreeHostImpl::deviceViewportSize() const
864 { 864 {
865 return m_deviceViewportSize; 865 return m_deviceViewportSize;
866 } 866 }
867 867
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
929 } 929 }
930 930
931 void LayerTreeHostImpl::createPendingTree() 931 void LayerTreeHostImpl::createPendingTree()
932 { 932 {
933 CHECK(!m_pendingTree); 933 CHECK(!m_pendingTree);
934 m_pendingTree = LayerTreeImpl::create(this); 934 m_pendingTree = LayerTreeImpl::create(this);
935 m_client->onCanDrawStateChanged(canDraw()); 935 m_client->onCanDrawStateChanged(canDraw());
936 m_client->onHasPendingTreeStateChanged(pendingTree()); 936 m_client->onHasPendingTreeStateChanged(pendingTree());
937 } 937 }
938 938
939 void LayerTreeHostImpl::checkForCompletedTextures() 939 void LayerTreeHostImpl::checkForCompletedTileUploads()
940 { 940 {
941 DCHECK(!m_client->isInsideDraw()) << "Checking for completed textures within a draw may trigger spurious redraws."; 941 DCHECK(!m_client->isInsideDraw()) << "Checking for completed uploads within a draw may trigger spurious redraws.";
942 if (m_tileManager) 942 if (m_tileManager)
943 m_tileManager->CheckForCompletedTextures(); 943 m_tileManager->CheckForCompletedTileUploads();
944 } 944 }
945 945
946 void LayerTreeHostImpl::activatePendingTreeIfNeeded() 946 void LayerTreeHostImpl::activatePendingTreeIfNeeded()
947 { 947 {
948 if (!pendingTree()) 948 if (!pendingTree())
949 return; 949 return;
950 950
951 // It's always fine to activate to an empty tree. Otherwise, only 951 // It's always fine to activate to an empty tree. Otherwise, only
952 // activate once all visible resources in pending tree are ready. 952 // activate once all visible resources in pending tree are ready.
953 if (activeTree()->RootLayer() && 953 if (activeTree()->RootLayer() &&
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
1693 LayerImpl* layer = getNonCompositedContentLayerRecursive(tree->RootLayer()); 1693 LayerImpl* layer = getNonCompositedContentLayerRecursive(tree->RootLayer());
1694 return layer ? layer->getPicture() : skia::RefPtr<SkPicture>(); 1694 return layer ? layer->getPicture() : skia::RefPtr<SkPicture>();
1695 } 1695 }
1696 1696
1697 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime) 1697 void LayerTreeHostImpl::savePaintTime(const base::TimeDelta& totalPaintTime)
1698 { 1698 {
1699 m_paintTimeCounter->SavePaintTime(totalPaintTime); 1699 m_paintTimeCounter->SavePaintTime(totalPaintTime);
1700 } 1700 }
1701 1701
1702 } // namespace cc 1702 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host_impl.h ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698