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 "cc/layer_tree_host.h" | 7 #include "cc/layer_tree_host.h" |
8 | 8 |
9 #include "Region.h" | 9 #include "Region.h" |
10 #include "base/debug/trace_event.h" | 10 #include "base/debug/trace_event.h" |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 | 322 |
323 void LayerTreeHost::didLoseContext() | 323 void LayerTreeHost::didLoseContext() |
324 { | 324 { |
325 TRACE_EVENT0("cc", "LayerTreeHost::didLoseContext"); | 325 TRACE_EVENT0("cc", "LayerTreeHost::didLoseContext"); |
326 DCHECK(m_proxy->isMainThread()); | 326 DCHECK(m_proxy->isMainThread()); |
327 m_contextLost = true; | 327 m_contextLost = true; |
328 m_numFailedRecreateAttempts = 0; | 328 m_numFailedRecreateAttempts = 0; |
329 setNeedsCommit(); | 329 setNeedsCommit(); |
330 } | 330 } |
331 | 331 |
332 bool LayerTreeHost::compositeAndReadback(void *pixels, const IntRect& rect) | 332 bool LayerTreeHost::compositeAndReadback(void *pixels, const gfx::Rect& rect) |
333 { | 333 { |
334 m_triggerIdleUpdates = false; | 334 m_triggerIdleUpdates = false; |
335 bool ret = m_proxy->compositeAndReadback(pixels, rect); | 335 bool ret = m_proxy->compositeAndReadback(pixels, rect); |
336 m_triggerIdleUpdates = true; | 336 m_triggerIdleUpdates = true; |
337 return ret; | 337 return ret; |
338 } | 338 } |
339 | 339 |
340 void LayerTreeHost::finishAllRendering() | 340 void LayerTreeHost::finishAllRendering() |
341 { | 341 { |
342 if (!m_rendererInitialized) | 342 if (!m_rendererInitialized) |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
832 else | 832 else |
833 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); | 833 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); |
834 } | 834 } |
835 } | 835 } |
836 | 836 |
837 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 837 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
838 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 838 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
839 } | 839 } |
840 | 840 |
841 } // namespace cc | 841 } // namespace cc |
OLD | NEW |