| 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 22 matching lines...) Expand all Loading... |
| 33 #include "platform/graphics/UnacceleratedImageBufferSurface.h" | 33 #include "platform/graphics/UnacceleratedImageBufferSurface.h" |
| 34 #include "platform/graphics/test/MockGLES2Interface.h" | 34 #include "platform/graphics/test/MockGLES2Interface.h" |
| 35 #include "platform/graphics/test/MockWebGraphicsContext3D.h" | 35 #include "platform/graphics/test/MockWebGraphicsContext3D.h" |
| 36 #include "public/platform/Platform.h" | 36 #include "public/platform/Platform.h" |
| 37 #include "public/platform/WebExternalBitmap.h" | 37 #include "public/platform/WebExternalBitmap.h" |
| 38 #include "public/platform/WebGraphicsContext3DProvider.h" | 38 #include "public/platform/WebGraphicsContext3DProvider.h" |
| 39 #include "public/platform/WebScheduler.h" | 39 #include "public/platform/WebScheduler.h" |
| 40 #include "public/platform/WebTaskRunner.h" | 40 #include "public/platform/WebTaskRunner.h" |
| 41 #include "public/platform/WebThread.h" | 41 #include "public/platform/WebThread.h" |
| 42 #include "public/platform/WebTraceLocation.h" | 42 #include "public/platform/WebTraceLocation.h" |
| 43 #include "public/platform/callback/WebClosure.h" | 43 #include "public/platform/functional/WebFunction.h" |
| 44 #include "skia/ext/texture_handle.h" | 44 #include "skia/ext/texture_handle.h" |
| 45 #include "testing/gmock/include/gmock/gmock.h" | 45 #include "testing/gmock/include/gmock/gmock.h" |
| 46 #include "testing/gtest/include/gtest/gtest.h" | 46 #include "testing/gtest/include/gtest/gtest.h" |
| 47 #include "third_party/skia/include/core/SkCanvas.h" | 47 #include "third_party/skia/include/core/SkCanvas.h" |
| 48 #include "third_party/skia/include/gpu/GrContext.h" | 48 #include "third_party/skia/include/gpu/GrContext.h" |
| 49 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" | 49 #include "third_party/skia/include/gpu/gl/GrGLInterface.h" |
| 50 #include "third_party/skia/include/gpu/gl/GrGLTypes.h" | 50 #include "third_party/skia/include/gpu/gl/GrGLTypes.h" |
| 51 #include "wtf/RefPtr.h" | 51 #include "wtf/RefPtr.h" |
| 52 | 52 |
| 53 #include <memory> | 53 #include <memory> |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 { | 89 { |
| 90 return m_grContext.get(); | 90 return m_grContext.get(); |
| 91 } | 91 } |
| 92 | 92 |
| 93 gpu::gles2::GLES2Interface* contextGL() override | 93 gpu::gles2::GLES2Interface* contextGL() override |
| 94 { | 94 { |
| 95 return m_gl; | 95 return m_gl; |
| 96 } | 96 } |
| 97 | 97 |
| 98 void setLostContextCallback(WebClosure) override {} | 98 void setLostContextCallback(WebClosure) override {} |
| 99 void setErrorMessageCallback(WebFunction<void(const char*, int32_t id)>) {} |
| 99 | 100 |
| 100 private: | 101 private: |
| 101 WebGraphicsContext3D* m_context3d; | 102 WebGraphicsContext3D* m_context3d; |
| 102 gpu::gles2::GLES2Interface* m_gl; | 103 gpu::gles2::GLES2Interface* m_gl; |
| 103 RefPtr<GrContext> m_grContext; | 104 RefPtr<GrContext> m_grContext; |
| 104 }; | 105 }; |
| 105 | 106 |
| 106 class Canvas2DLayerBridgePtr { | 107 class Canvas2DLayerBridgePtr { |
| 107 public: | 108 public: |
| 108 Canvas2DLayerBridgePtr() { } | 109 Canvas2DLayerBridgePtr() { } |
| (...skipping 1018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1127 WebExternalTextureMailbox mailbox; | 1128 WebExternalTextureMailbox mailbox; |
| 1128 EXPECT_FALSE(bridge->prepareMailbox(&mailbox, 0)); | 1129 EXPECT_FALSE(bridge->prepareMailbox(&mailbox, 0)); |
| 1129 EXPECT_TRUE(bridge->checkSurfaceValid()); | 1130 EXPECT_TRUE(bridge->checkSurfaceValid()); |
| 1130 | 1131 |
| 1131 // Tear down the bridge on the thread so that 'bridge' can go out of scope | 1132 // Tear down the bridge on the thread so that 'bridge' can go out of scope |
| 1132 // without crashing due to thread checks | 1133 // without crashing due to thread checks |
| 1133 postAndWaitDestroyBridgeTask(BLINK_FROM_HERE, testThread.get(), &bridge); | 1134 postAndWaitDestroyBridgeTask(BLINK_FROM_HERE, testThread.get(), &bridge); |
| 1134 } | 1135 } |
| 1135 | 1136 |
| 1136 } // namespace blink | 1137 } // namespace blink |
| OLD | NEW |