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

Side by Side Diff: cc/layer_tree_host.cc

Issue 11028132: cc: The recent texture manager bug uncovered some unnecessary code (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Make haveTexturesForTilesConst Created 8 years, 2 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
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 "CCLayerTreeHost.h" 7 #include "CCLayerTreeHost.h"
8 8
9 #include "CCFontAtlas.h" 9 #include "CCFontAtlas.h"
10 #include "CCGraphicsContext.h" 10 #include "CCGraphicsContext.h"
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 if (m_fontAtlas.get()) 293 if (m_fontAtlas.get())
294 m_hudLayer->setFontAtlas(m_fontAtlas.Pass()); 294 m_hudLayer->setFontAtlas(m_fontAtlas.Pass());
295 295
296 if (!m_hudLayer->parent()) 296 if (!m_hudLayer->parent())
297 m_rootLayer->addChild(m_hudLayer); 297 m_rootLayer->addChild(m_hudLayer);
298 } 298 }
299 } 299 }
300 300
301 void CCLayerTreeHost::commitComplete() 301 void CCLayerTreeHost::commitComplete()
302 { 302 {
303 m_deleteTextureAfterCommitList.clear();
304 m_client->didCommit(); 303 m_client->didCommit();
305 } 304 }
306 305
307 scoped_ptr<CCGraphicsContext> CCLayerTreeHost::createContext() 306 scoped_ptr<CCGraphicsContext> CCLayerTreeHost::createContext()
308 { 307 {
309 return m_client->createOutputSurface(); 308 return m_client->createOutputSurface();
310 } 309 }
311 310
312 scoped_ptr<CCInputHandler> CCLayerTreeHost::createInputHandler() 311 scoped_ptr<CCInputHandler> CCLayerTreeHost::createInputHandler()
313 { 312 {
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after
754 753
755 bool CCLayerTreeHost::requestPartialTextureUpdate() 754 bool CCLayerTreeHost::requestPartialTextureUpdate()
756 { 755 {
757 if (m_partialTextureUpdateRequests >= m_settings.maxPartialTextureUpdates) 756 if (m_partialTextureUpdateRequests >= m_settings.maxPartialTextureUpdates)
758 return false; 757 return false;
759 758
760 m_partialTextureUpdateRequests++; 759 m_partialTextureUpdateRequests++;
761 return true; 760 return true;
762 } 761 }
763 762
764 void CCLayerTreeHost::deleteTextureAfterCommit(scoped_ptr<CCPrioritizedTexture> texture)
765 {
766 m_deleteTextureAfterCommitList.append(texture.Pass());
767 }
768
769 void CCLayerTreeHost::setDeviceScaleFactor(float deviceScaleFactor) 763 void CCLayerTreeHost::setDeviceScaleFactor(float deviceScaleFactor)
770 { 764 {
771 if (deviceScaleFactor == m_deviceScaleFactor) 765 if (deviceScaleFactor == m_deviceScaleFactor)
772 return; 766 return;
773 m_deviceScaleFactor = deviceScaleFactor; 767 m_deviceScaleFactor = deviceScaleFactor;
774 768
775 setNeedsCommit(); 769 setNeedsCommit();
776 } 770 }
777 771
778 void CCLayerTreeHost::animateLayers(double monotonicTime) 772 void CCLayerTreeHost::animateLayers(double monotonicTime)
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 else 811 else
818 layer->notifyAnimationFinished(wallClockTime); 812 layer->notifyAnimationFinished(wallClockTime);
819 } 813 }
820 } 814 }
821 815
822 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) 816 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex)
823 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); 817 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime);
824 } 818 }
825 819
826 } // namespace cc 820 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/overdraw_metrics.h » ('j') | cc/tiled_layer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698