OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "core/dom/CompositorProxy.h" | 5 #include "core/dom/CompositorProxy.h" |
6 | 6 |
7 #include "bindings/core/v8/ExceptionMessages.h" | 7 #include "bindings/core/v8/ExceptionMessages.h" |
8 #include "bindings/core/v8/ExceptionState.h" | 8 #include "bindings/core/v8/ExceptionState.h" |
9 #include "core/dom/DOMNodeIds.h" | 9 #include "core/dom/DOMNodeIds.h" |
10 #include "core/dom/ExceptionCode.h" | 10 #include "core/dom/ExceptionCode.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 return mapping.property; | 35 return mapping.property; |
36 } | 36 } |
37 return CompositorMutableProperty::kNone; | 37 return CompositorMutableProperty::kNone; |
38 } | 38 } |
39 | 39 |
40 static bool isControlThread() { | 40 static bool isControlThread() { |
41 return !isMainThread(); | 41 return !isMainThread(); |
42 } | 42 } |
43 | 43 |
44 static bool isCallingCompositorFrameCallback() { | 44 static bool isCallingCompositorFrameCallback() { |
45 // TODO(sad): Check that the requestCompositorFrame callbacks are currently be
ing called. | 45 // TODO(sad): Check that the requestCompositorFrame callbacks are currently |
| 46 // being called. |
46 return true; | 47 return true; |
47 } | 48 } |
48 | 49 |
49 static void decrementCompositorProxiedPropertiesForElement( | 50 static void decrementCompositorProxiedPropertiesForElement( |
50 uint64_t elementId, | 51 uint64_t elementId, |
51 uint32_t compositorMutableProperties) { | 52 uint32_t compositorMutableProperties) { |
52 DCHECK(isMainThread()); | 53 DCHECK(isMainThread()); |
53 Node* node = DOMNodeIds::nodeForId(elementId); | 54 Node* node = DOMNodeIds::nodeForId(elementId); |
54 if (!node) | 55 if (!node) |
55 return; | 56 return; |
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
298 m_elementId, m_compositorMutableProperties); | 299 m_elementId, m_compositorMutableProperties); |
299 } else { | 300 } else { |
300 Platform::current()->mainThread()->getWebTaskRunner()->postTask( | 301 Platform::current()->mainThread()->getWebTaskRunner()->postTask( |
301 BLINK_FROM_HERE, | 302 BLINK_FROM_HERE, |
302 crossThreadBind(&decrementCompositorProxiedPropertiesForElement, | 303 crossThreadBind(&decrementCompositorProxiedPropertiesForElement, |
303 m_elementId, m_compositorMutableProperties)); | 304 m_elementId, m_compositorMutableProperties)); |
304 } | 305 } |
305 } | 306 } |
306 | 307 |
307 } // namespace blink | 308 } // namespace blink |
OLD | NEW |