OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
65 | 65 |
66 class FakeWebGraphicsContext3DProvider : public WebGraphicsContext3DProvider { | 66 class FakeWebGraphicsContext3DProvider : public WebGraphicsContext3DProvider { |
67 public: | 67 public: |
68 FakeWebGraphicsContext3DProvider(gpu::gles2::GLES2Interface* gl) | 68 FakeWebGraphicsContext3DProvider(gpu::gles2::GLES2Interface* gl) |
69 : m_gl(gl) | 69 : m_gl(gl) |
70 { | 70 { |
71 RefPtr<const GrGLInterface> glInterface = adoptRef(GrGLCreateNullInterfa
ce()); | 71 RefPtr<const GrGLInterface> glInterface = adoptRef(GrGLCreateNullInterfa
ce()); |
72 m_grContext = adoptRef(GrContext::Create(kOpenGL_GrBackend, reinterpret_
cast<GrBackendContext>(glInterface.get()))); | 72 m_grContext = adoptRef(GrContext::Create(kOpenGL_GrBackend, reinterpret_
cast<GrBackendContext>(glInterface.get()))); |
73 } | 73 } |
74 | 74 |
75 WebGraphicsContext3D* context3d() override | |
76 { | |
77 return nullptr; | |
78 } | |
79 | |
80 GrContext* grContext() override | 75 GrContext* grContext() override |
81 { | 76 { |
82 return m_grContext.get(); | 77 return m_grContext.get(); |
83 } | 78 } |
84 | 79 |
85 gpu::Capabilities getCapabilities() | 80 gpu::Capabilities getCapabilities() |
86 { | 81 { |
87 return gpu::Capabilities(); | 82 return gpu::Capabilities(); |
88 } | 83 } |
89 | 84 |
(...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 WebExternalTextureMailbox mailbox; | 1041 WebExternalTextureMailbox mailbox; |
1047 EXPECT_FALSE(bridge->prepareMailbox(&mailbox, 0)); | 1042 EXPECT_FALSE(bridge->prepareMailbox(&mailbox, 0)); |
1048 EXPECT_TRUE(bridge->checkSurfaceValid()); | 1043 EXPECT_TRUE(bridge->checkSurfaceValid()); |
1049 | 1044 |
1050 // Tear down the bridge on the thread so that 'bridge' can go out of scope | 1045 // Tear down the bridge on the thread so that 'bridge' can go out of scope |
1051 // without crashing due to thread checks | 1046 // without crashing due to thread checks |
1052 postAndWaitDestroyBridgeTask(BLINK_FROM_HERE, testThread.get(), &bridge); | 1047 postAndWaitDestroyBridgeTask(BLINK_FROM_HERE, testThread.get(), &bridge); |
1053 } | 1048 } |
1054 | 1049 |
1055 } // namespace blink | 1050 } // namespace blink |
OLD | NEW |