| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 class WebGraphicsContext3DProviderForTests : public WebGraphicsContext3DProvider
{ | 236 class WebGraphicsContext3DProviderForTests : public WebGraphicsContext3DProvider
{ |
| 237 public: | 237 public: |
| 238 WebGraphicsContext3DProviderForTests(PassOwnPtr<gpu::gles2::GLES2Interface>
gl) | 238 WebGraphicsContext3DProviderForTests(PassOwnPtr<gpu::gles2::GLES2Interface>
gl) |
| 239 : m_gl(std::move(gl)) | 239 : m_gl(std::move(gl)) |
| 240 { | 240 { |
| 241 } | 241 } |
| 242 | 242 |
| 243 gpu::gles2::GLES2Interface* contextGL() override { return m_gl.get(); } | 243 gpu::gles2::GLES2Interface* contextGL() override { return m_gl.get(); } |
| 244 // Not used by WebGL code. | 244 // Not used by WebGL code. |
| 245 GrContext* grContext() override { return nullptr; } | 245 GrContext* grContext() override { return nullptr; } |
| 246 void DetachFromThread() override {} |
| 246 gpu::Capabilities getCapabilities() | 247 gpu::Capabilities getCapabilities() |
| 247 { | 248 { |
| 248 return gpu::Capabilities(); | 249 return gpu::Capabilities(); |
| 249 } | 250 } |
| 250 void setLostContextCallback(WebClosure) {} | 251 void setLostContextCallback(WebClosure) {} |
| 251 void setErrorMessageCallback(WebFunction<void(const char*, int32_t id)>) {} | 252 void setErrorMessageCallback(WebFunction<void(const char*, int32_t id)>) {} |
| 252 | 253 |
| 253 private: | 254 private: |
| 254 OwnPtr<gpu::gles2::GLES2Interface> m_gl; | 255 OwnPtr<gpu::gles2::GLES2Interface> m_gl; |
| 255 }; | 256 }; |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 760 m_drawingBuffer->markContentsChanged(); | 761 m_drawingBuffer->markContentsChanged(); |
| 761 EXPECT_TRUE(m_drawingBuffer->prepareMailbox(&mailbox, 0)); | 762 EXPECT_TRUE(m_drawingBuffer->prepareMailbox(&mailbox, 0)); |
| 762 EXPECT_EQ(initialSize, m_gl->mostRecentlyProducedSize()); | 763 EXPECT_EQ(initialSize, m_gl->mostRecentlyProducedSize()); |
| 763 EXPECT_FALSE(mailbox.allowOverlay); | 764 EXPECT_FALSE(mailbox.allowOverlay); |
| 764 | 765 |
| 765 m_drawingBuffer->mailboxReleased(mailbox, false); | 766 m_drawingBuffer->mailboxReleased(mailbox, false); |
| 766 m_drawingBuffer->beginDestruction(); | 767 m_drawingBuffer->beginDestruction(); |
| 767 } | 768 } |
| 768 | 769 |
| 769 } // namespace blink | 770 } // namespace blink |
| OLD | NEW |