| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 { | 99 { |
| 100 return GL_FRAMEBUFFER_COMPLETE; | 100 return GL_FRAMEBUFFER_COMPLETE; |
| 101 } | 101 } |
| 102 | 102 |
| 103 void GetIntegerv(GLenum pname, GLint* value) override | 103 void GetIntegerv(GLenum pname, GLint* value) override |
| 104 { | 104 { |
| 105 if (pname == GL_MAX_TEXTURE_SIZE) | 105 if (pname == GL_MAX_TEXTURE_SIZE) |
| 106 *value = 1024; | 106 *value = 1024; |
| 107 } | 107 } |
| 108 | 108 |
| 109 void GetImageivCHROMIUM(GLuint imageId, GLenum pname, GLint* data) override |
| 110 { |
| 111 if (pname == GC3D_GPU_MEMORY_BUFFER_ID) |
| 112 *data = 1; |
| 113 else |
| 114 *data = -1; |
| 115 } |
| 116 |
| 109 void GenMailboxCHROMIUM(GLbyte* mailbox) override | 117 void GenMailboxCHROMIUM(GLbyte* mailbox) override |
| 110 { | 118 { |
| 111 ++m_currentMailboxByte; | 119 ++m_currentMailboxByte; |
| 112 WebExternalTextureMailbox temp; | 120 WebExternalTextureMailbox temp; |
| 113 memset(mailbox, m_currentMailboxByte, sizeof(temp.name)); | 121 memset(mailbox, m_currentMailboxByte, sizeof(temp.name)); |
| 114 } | 122 } |
| 115 | 123 |
| 116 void ProduceTextureDirectCHROMIUM(GLuint texture, GLenum target, const GLbyt
e* mailbox) override | 124 void ProduceTextureDirectCHROMIUM(GLuint texture, GLenum target, const GLbyt
e* mailbox) override |
| 117 { | 125 { |
| 118 ASSERT_EQ(target, drawingBufferTextureTarget(m_allowImageChromium)); | 126 ASSERT_EQ(target, drawingBufferTextureTarget(m_allowImageChromium)); |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 m_drawingBuffer->markContentsChanged(); | 767 m_drawingBuffer->markContentsChanged(); |
| 760 EXPECT_TRUE(m_drawingBuffer->prepareMailbox(&mailbox, 0)); | 768 EXPECT_TRUE(m_drawingBuffer->prepareMailbox(&mailbox, 0)); |
| 761 EXPECT_EQ(initialSize, m_gl->mostRecentlyProducedSize()); | 769 EXPECT_EQ(initialSize, m_gl->mostRecentlyProducedSize()); |
| 762 EXPECT_FALSE(mailbox.allowOverlay); | 770 EXPECT_FALSE(mailbox.allowOverlay); |
| 763 | 771 |
| 764 m_drawingBuffer->mailboxReleased(mailbox, false); | 772 m_drawingBuffer->mailboxReleased(mailbox, false); |
| 765 m_drawingBuffer->beginDestruction(); | 773 m_drawingBuffer->beginDestruction(); |
| 766 } | 774 } |
| 767 | 775 |
| 768 } // namespace blink | 776 } // namespace blink |
| OLD | NEW |