| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 class WebGraphicsContext3DProviderForTests : public WebGraphicsContext3DProvider
{ | 234 class WebGraphicsContext3DProviderForTests : public WebGraphicsContext3DProvider
{ |
| 235 public: | 235 public: |
| 236 WebGraphicsContext3DProviderForTests(PassOwnPtr<gpu::gles2::GLES2Interface>
gl) | 236 WebGraphicsContext3DProviderForTests(PassOwnPtr<gpu::gles2::GLES2Interface>
gl) |
| 237 : m_gl(std::move(gl)) | 237 : m_gl(std::move(gl)) |
| 238 { | 238 { |
| 239 } | 239 } |
| 240 | 240 |
| 241 gpu::gles2::GLES2Interface* contextGL() override { return m_gl.get(); } | 241 gpu::gles2::GLES2Interface* contextGL() override { return m_gl.get(); } |
| 242 // Not used by WebGL code. | 242 // Not used by WebGL code. |
| 243 GrContext* grContext() override { return nullptr; } | 243 GrContext* grContext() override { return nullptr; } |
| 244 bool bindToCurrentThread() override { return false; } |
| 244 gpu::Capabilities getCapabilities() | 245 gpu::Capabilities getCapabilities() |
| 245 { | 246 { |
| 246 return gpu::Capabilities(); | 247 return gpu::Capabilities(); |
| 247 } | 248 } |
| 248 void setLostContextCallback(WebClosure) {} | 249 void setLostContextCallback(WebClosure) {} |
| 249 void setErrorMessageCallback(WebFunction<void(const char*, int32_t id)>) {} | 250 void setErrorMessageCallback(WebFunction<void(const char*, int32_t id)>) {} |
| 250 | 251 |
| 251 private: | 252 private: |
| 252 OwnPtr<gpu::gles2::GLES2Interface> m_gl; | 253 OwnPtr<gpu::gles2::GLES2Interface> m_gl; |
| 253 }; | 254 }; |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 m_drawingBuffer->markContentsChanged(); | 759 m_drawingBuffer->markContentsChanged(); |
| 759 EXPECT_TRUE(m_drawingBuffer->prepareMailbox(&mailbox, 0)); | 760 EXPECT_TRUE(m_drawingBuffer->prepareMailbox(&mailbox, 0)); |
| 760 EXPECT_EQ(initialSize, m_gl->mostRecentlyProducedSize()); | 761 EXPECT_EQ(initialSize, m_gl->mostRecentlyProducedSize()); |
| 761 EXPECT_FALSE(mailbox.allowOverlay); | 762 EXPECT_FALSE(mailbox.allowOverlay); |
| 762 | 763 |
| 763 m_drawingBuffer->mailboxReleased(mailbox, false); | 764 m_drawingBuffer->mailboxReleased(mailbox, false); |
| 764 m_drawingBuffer->beginDestruction(); | 765 m_drawingBuffer->beginDestruction(); |
| 765 } | 766 } |
| 766 | 767 |
| 767 } // namespace blink | 768 } // namespace blink |
| OLD | NEW |