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 "CCLayerTreeHost.h" | 7 #include "CCLayerTreeHost.h" |
8 | 8 |
9 #include "CCGeometryTestUtils.h" | 9 #include "CCGeometryTestUtils.h" |
10 #include "CCGraphicsContext.h" | 10 #include "CCGraphicsContext.h" |
(...skipping 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2751 virtual void endQueryEXT(GC3Denum) | 2751 virtual void endQueryEXT(GC3Denum) |
2752 { | 2752 { |
2753 // Lose context. | 2753 // Lose context. |
2754 if (!m_isContextLost) { | 2754 if (!m_isContextLost) { |
2755 m_contextLostCallback->onContextLost(); | 2755 m_contextLostCallback->onContextLost(); |
2756 m_isContextLost = true; | 2756 m_isContextLost = true; |
2757 } | 2757 } |
2758 } | 2758 } |
2759 virtual void getQueryObjectuivEXT(WebGLId, GC3Denum pname, GC3Duint* params) | 2759 virtual void getQueryObjectuivEXT(WebGLId, GC3Denum pname, GC3Duint* params) |
2760 { | 2760 { |
2761 // Context is lost. Result will never be available. | 2761 // Context is lost. We need to behave as if result is available. |
2762 if (pname == Extensions3DChromium::QUERY_RESULT_AVAILABLE_EXT) | 2762 if (pname == Extensions3DChromium::QUERY_RESULT_AVAILABLE_EXT) |
2763 *params = 0; | 2763 *params = 1; |
2764 } | 2764 } |
2765 | 2765 |
2766 private: | 2766 private: |
2767 explicit CompositorFakeWebGraphicsContext3DWithEndQueryCausingLostContext(At
tributes attrs) | 2767 explicit CompositorFakeWebGraphicsContext3DWithEndQueryCausingLostContext(At
tributes attrs) |
2768 : CompositorFakeWebGraphicsContext3D(attrs) | 2768 : CompositorFakeWebGraphicsContext3D(attrs) |
2769 , m_contextLostCallback(0) | 2769 , m_contextLostCallback(0) |
2770 , m_isContextLost(false) { } | 2770 , m_isContextLost(false) { } |
2771 | 2771 |
2772 WebGraphicsContextLostCallback* m_contextLostCallback; | 2772 WebGraphicsContextLostCallback* m_contextLostCallback; |
2773 bool m_isContextLost; | 2773 bool m_isContextLost; |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2990 int m_numCommitComplete; | 2990 int m_numCommitComplete; |
2991 int m_numDrawLayers; | 2991 int m_numDrawLayers; |
2992 }; | 2992 }; |
2993 | 2993 |
2994 TEST_F(CCLayerTreeHostTestContinuousAnimate, runMultiThread) | 2994 TEST_F(CCLayerTreeHostTestContinuousAnimate, runMultiThread) |
2995 { | 2995 { |
2996 runTest(true); | 2996 runTest(true); |
2997 } | 2997 } |
2998 | 2998 |
2999 } // namespace | 2999 } // namespace |
OLD | NEW |