Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "CCAppendQuadsData.h" | 10 #include "CCAppendQuadsData.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 225 , m_contentsTexturesPurged(false) | 225 , m_contentsTexturesPurged(false) |
| 226 , m_memoryAllocationLimitBytes(CCPrioritizedTextureManager::defaultMemoryAll ocationLimit()) | 226 , m_memoryAllocationLimitBytes(CCPrioritizedTextureManager::defaultMemoryAll ocationLimit()) |
| 227 , m_backgroundColor(0) | 227 , m_backgroundColor(0) |
| 228 , m_hasTransparentBackground(false) | 228 , m_hasTransparentBackground(false) |
| 229 , m_needsAnimateLayers(false) | 229 , m_needsAnimateLayers(false) |
| 230 , m_pinchGestureActive(false) | 230 , m_pinchGestureActive(false) |
| 231 , m_fpsCounter(CCFrameRateCounter::create()) | 231 , m_fpsCounter(CCFrameRateCounter::create()) |
| 232 , m_debugRectHistory(CCDebugRectHistory::create()) | 232 , m_debugRectHistory(CCDebugRectHistory::create()) |
| 233 , m_numImplThreadScrolls(0) | 233 , m_numImplThreadScrolls(0) |
| 234 , m_numMainThreadScrolls(0) | 234 , m_numMainThreadScrolls(0) |
| 235 , m_showFPSCounter(false) | |
| 235 { | 236 { |
| 236 ASSERT(CCProxy::isImplThread()); | 237 ASSERT(CCProxy::isImplThread()); |
| 237 didVisibilityChange(this, m_visible); | 238 didVisibilityChange(this, m_visible); |
| 238 } | 239 } |
| 239 | 240 |
| 240 CCLayerTreeHostImpl::~CCLayerTreeHostImpl() | 241 CCLayerTreeHostImpl::~CCLayerTreeHostImpl() |
| 241 { | 242 { |
| 242 ASSERT(CCProxy::isImplThread()); | 243 ASSERT(CCProxy::isImplThread()); |
| 243 TRACE_EVENT0("cc", "CCLayerTreeHostImpl::~CCLayerTreeHostImpl()"); | 244 TRACE_EVENT0("cc", "CCLayerTreeHostImpl::~CCLayerTreeHostImpl()"); |
| 244 | 245 |
| (...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1452 return; | 1453 return; |
| 1453 | 1454 |
| 1454 CCScrollbarAnimationController* scrollbarController = layer->scrollbarAnimat ionController(); | 1455 CCScrollbarAnimationController* scrollbarController = layer->scrollbarAnimat ionController(); |
| 1455 if (scrollbarController && scrollbarController->animate(monotonicTime)) | 1456 if (scrollbarController && scrollbarController->animate(monotonicTime)) |
| 1456 m_client->setNeedsRedrawOnImplThread(); | 1457 m_client->setNeedsRedrawOnImplThread(); |
| 1457 | 1458 |
| 1458 for (size_t i = 0; i < layer->children().size(); ++i) | 1459 for (size_t i = 0; i < layer->children().size(); ++i) |
| 1459 animateScrollbarsRecursive(layer->children()[i], monotonicTime); | 1460 animateScrollbarsRecursive(layer->children()[i], monotonicTime); |
| 1460 } | 1461 } |
| 1461 | 1462 |
| 1463 void CCLayerTreeHostImpl::setShowFPSCounter(bool show) | |
|
nduca
2012/10/20 19:49:41
Can this be state on the hud layer? e.g this funct
| |
| 1464 { | |
| 1465 ASSERT(CCProxy::isImplThread()); | |
| 1466 m_showFPSCounter = show; | |
| 1467 } | |
| 1468 | |
| 1469 bool CCLayerTreeHostImpl::showFPSCounter() const | |
| 1470 { | |
| 1471 return m_showFPSCounter; | |
| 1472 } | |
| 1473 | |
| 1462 } // namespace cc | 1474 } // namespace cc |
| OLD | NEW |