| 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 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 { | 216 { |
| 217 return m_contextGL->mostRecentlyProducedSize(); | 217 return m_contextGL->mostRecentlyProducedSize(); |
| 218 } | 218 } |
| 219 | 219 |
| 220 | 220 |
| 221 WGC3Duint nextImageIdToBeCreated() | 221 WGC3Duint nextImageIdToBeCreated() |
| 222 { | 222 { |
| 223 return m_contextGL->currentImageId(); | 223 return m_contextGL->currentImageId(); |
| 224 } | 224 } |
| 225 | 225 |
| 226 gpu::gles2::GLES2Interface* getGLES2Interface() override | |
| 227 { | |
| 228 return m_contextGL; | |
| 229 } | |
| 230 | |
| 231 private: | 226 private: |
| 232 GLES2InterfaceForTests* m_contextGL; | 227 GLES2InterfaceForTests* m_contextGL; |
| 233 }; | 228 }; |
| 234 | 229 |
| 235 static const int initialWidth = 100; | 230 static const int initialWidth = 100; |
| 236 static const int initialHeight = 100; | 231 static const int initialHeight = 100; |
| 237 static const int alternateHeight = 50; | 232 static const int alternateHeight = 50; |
| 238 | 233 |
| 239 class DrawingBufferForTests : public DrawingBuffer { | 234 class DrawingBufferForTests : public DrawingBuffer { |
| 240 public: | 235 public: |
| (...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 : m_contextGL(gl) | 674 : m_contextGL(gl) |
| 680 { | 675 { |
| 681 } | 676 } |
| 682 ~DepthStencilTrackingContext() override {} | 677 ~DepthStencilTrackingContext() override {} |
| 683 | 678 |
| 684 size_t numAllocatedRenderBuffer() const { return m_contextGL->numAllocatedRe
nderBuffer(); } | 679 size_t numAllocatedRenderBuffer() const { return m_contextGL->numAllocatedRe
nderBuffer(); } |
| 685 WebGLId stencilAttachment() const { return m_contextGL->stencilAttachment();
} | 680 WebGLId stencilAttachment() const { return m_contextGL->stencilAttachment();
} |
| 686 WebGLId depthAttachment() const { return m_contextGL->depthAttachment(); } | 681 WebGLId depthAttachment() const { return m_contextGL->depthAttachment(); } |
| 687 WebGLId depthStencilAttachment() const { return m_contextGL->depthStencilAtt
achment(); } | 682 WebGLId depthStencilAttachment() const { return m_contextGL->depthStencilAtt
achment(); } |
| 688 | 683 |
| 689 gpu::gles2::GLES2Interface* getGLES2Interface() override { return m_contextG
L; } | |
| 690 | |
| 691 private: | 684 private: |
| 692 DepthStencilTrackingGLES2Interface* m_contextGL; | 685 DepthStencilTrackingGLES2Interface* m_contextGL; |
| 693 }; | 686 }; |
| 694 | 687 |
| 695 struct DepthStencilTestCase { | 688 struct DepthStencilTestCase { |
| 696 DepthStencilTestCase(bool requestStencil, bool requestDepth, int expectedRen
derBuffers, const char* const testCaseName) | 689 DepthStencilTestCase(bool requestStencil, bool requestDepth, int expectedRen
derBuffers, const char* const testCaseName) |
| 697 : requestStencil(requestStencil) | 690 : requestStencil(requestStencil) |
| 698 , requestDepth(requestDepth) | 691 , requestDepth(requestDepth) |
| 699 , expectedRenderBuffers(expectedRenderBuffers) | 692 , expectedRenderBuffers(expectedRenderBuffers) |
| 700 , testCaseName(testCaseName) { } | 693 , testCaseName(testCaseName) { } |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 m_drawingBuffer->markContentsChanged(); | 807 m_drawingBuffer->markContentsChanged(); |
| 815 EXPECT_TRUE(m_drawingBuffer->prepareMailbox(&mailbox, 0)); | 808 EXPECT_TRUE(m_drawingBuffer->prepareMailbox(&mailbox, 0)); |
| 816 EXPECT_EQ(initialSize, webContext()->mostRecentlyProducedSize()); | 809 EXPECT_EQ(initialSize, webContext()->mostRecentlyProducedSize()); |
| 817 EXPECT_FALSE(mailbox.allowOverlay); | 810 EXPECT_FALSE(mailbox.allowOverlay); |
| 818 | 811 |
| 819 m_drawingBuffer->mailboxReleased(mailbox, false); | 812 m_drawingBuffer->mailboxReleased(mailbox, false); |
| 820 m_drawingBuffer->beginDestruction(); | 813 m_drawingBuffer->beginDestruction(); |
| 821 } | 814 } |
| 822 | 815 |
| 823 } // namespace blink | 816 } // namespace blink |
| OLD | NEW |