OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <GLES2/gl2.h> | 5 #include <GLES2/gl2.h> |
6 #include <GLES2/gl2ext.h> | 6 #include <GLES2/gl2ext.h> |
7 #include <GLES2/gl2extchromium.h> | 7 #include <GLES2/gl2extchromium.h> |
8 | 8 |
9 #include "gpu/command_buffer/client/gles2_lib.h" | 9 #include "gpu/command_buffer/client/gles2_lib.h" |
10 #include "gpu/command_buffer/common/mailbox.h" | 10 #include "gpu/command_buffer/common/mailbox.h" |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 glBindFramebuffer(GL_FRAMEBUFFER, old_fbo); | 47 glBindFramebuffer(GL_FRAMEBUFFER, old_fbo); |
48 | 48 |
49 glDeleteFramebuffers(1, &fbo); | 49 glDeleteFramebuffers(1, &fbo); |
50 | 50 |
51 return texel; | 51 return texel; |
52 } | 52 } |
53 } | 53 } |
54 | 54 |
55 class GLTextureMailboxTest : public testing::Test { | 55 class GLTextureMailboxTest : public testing::Test { |
56 protected: | 56 protected: |
57 virtual void SetUp() { | 57 void SetUp() override { |
58 gl1_.Initialize(GLManager::Options()); | 58 gl1_.Initialize(GLManager::Options()); |
59 GLManager::Options options; | 59 GLManager::Options options; |
60 options.share_mailbox_manager = &gl1_; | 60 options.share_mailbox_manager = &gl1_; |
61 gl2_.Initialize(options); | 61 gl2_.Initialize(options); |
62 } | 62 } |
63 | 63 |
64 virtual void TearDown() { | 64 void TearDown() override { |
65 gl1_.Destroy(); | 65 gl1_.Destroy(); |
66 gl2_.Destroy(); | 66 gl2_.Destroy(); |
67 } | 67 } |
68 | 68 |
69 GLManager gl1_; | 69 GLManager gl1_; |
70 GLManager gl2_; | 70 GLManager gl2_; |
71 }; | 71 }; |
72 | 72 |
73 TEST_F(GLTextureMailboxTest, ProduceAndConsumeTexture) { | 73 TEST_F(GLTextureMailboxTest, ProduceAndConsumeTexture) { |
74 gl1_.MakeCurrent(); | 74 gl1_.MakeCurrent(); |
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 other_gl[i].Destroy(); | 445 other_gl[i].Destroy(); |
446 } | 446 } |
447 | 447 |
448 gl1_.MakeCurrent(); | 448 gl1_.MakeCurrent(); |
449 glDeleteTextures(2, tex); | 449 glDeleteTextures(2, tex); |
450 } | 450 } |
451 #endif | 451 #endif |
452 | 452 |
453 } // namespace gpu | 453 } // namespace gpu |
454 | 454 |
OLD | NEW |