OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "gpu/command_buffer/service/mailbox_manager.h" | 5 #include "gpu/command_buffer/service/mailbox_manager.h" |
6 | 6 |
7 #include "gpu/command_buffer/service/feature_info.h" | 7 #include "gpu/command_buffer/service/feature_info.h" |
8 #include "gpu/command_buffer/service/gpu_service_test.h" | 8 #include "gpu/command_buffer/service/gpu_service_test.h" |
9 #include "gpu/command_buffer/service/mailbox_synchronizer.h" | 9 #include "gpu/command_buffer/service/mailbox_synchronizer.h" |
10 #include "gpu/command_buffer/service/texture_manager.h" | 10 #include "gpu/command_buffer/service/texture_manager.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 width, | 71 width, |
72 height, | 72 height, |
73 depth, | 73 depth, |
74 border, | 74 border, |
75 format, | 75 format, |
76 type, | 76 type, |
77 cleared); | 77 cleared); |
78 } | 78 } |
79 | 79 |
80 GLenum SetParameter(Texture* texture, GLenum pname, GLint param) { | 80 GLenum SetParameter(Texture* texture, GLenum pname, GLint param) { |
81 return texture->SetParameteri(feature_info_, pname, param); | 81 return texture->SetParameteri(feature_info_.get(), pname, param); |
82 } | 82 } |
83 | 83 |
84 void DestroyTexture(Texture* texture) { | 84 void DestroyTexture(Texture* texture) { |
85 delete texture; | 85 delete texture; |
86 } | 86 } |
87 | 87 |
88 scoped_refptr<MailboxManager> manager_; | 88 scoped_refptr<MailboxManager> manager_; |
89 | 89 |
90 private: | 90 private: |
91 bool initialized_synchronizer_; | 91 bool initialized_synchronizer_; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 public: | 198 public: |
199 MailboxManagerSyncTest() {} | 199 MailboxManagerSyncTest() {} |
200 virtual ~MailboxManagerSyncTest() {} | 200 virtual ~MailboxManagerSyncTest() {} |
201 | 201 |
202 protected: | 202 protected: |
203 virtual void SetUp() { | 203 virtual void SetUp() { |
204 MailboxManagerTest::SetUpWithSynchronizer(); | 204 MailboxManagerTest::SetUpWithSynchronizer(); |
205 manager2_ = new MailboxManager; | 205 manager2_ = new MailboxManager; |
206 context_ = new gfx::GLContextStub(); | 206 context_ = new gfx::GLContextStub(); |
207 surface_ = new gfx::GLSurfaceStub(); | 207 surface_ = new gfx::GLSurfaceStub(); |
208 context_->MakeCurrent(surface_); | 208 context_->MakeCurrent(surface_.get()); |
209 } | 209 } |
210 | 210 |
211 Texture* DefineTexture() { | 211 Texture* DefineTexture() { |
212 Texture* texture = CreateTexture(); | 212 Texture* texture = CreateTexture(); |
213 const GLsizei levels_needed = TextureManager::ComputeMipMapCount( | 213 const GLsizei levels_needed = TextureManager::ComputeMipMapCount( |
214 GL_TEXTURE_2D, kMaxTextureWidth, kMaxTextureHeight, kMaxTextureDepth); | 214 GL_TEXTURE_2D, kMaxTextureWidth, kMaxTextureHeight, kMaxTextureDepth); |
215 SetTarget(texture, GL_TEXTURE_2D, levels_needed); | 215 SetTarget(texture, GL_TEXTURE_2D, levels_needed); |
216 SetLevelInfo(texture, | 216 SetLevelInfo(texture, |
217 GL_TEXTURE_2D, | 217 GL_TEXTURE_2D, |
218 0, | 218 0, |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
470 // TODO: same texture, multiple mailboxes | 470 // TODO: same texture, multiple mailboxes |
471 | 471 |
472 // TODO: Produce incomplete texture | 472 // TODO: Produce incomplete texture |
473 | 473 |
474 // TODO: Texture::level_infos_[][].size() | 474 // TODO: Texture::level_infos_[][].size() |
475 | 475 |
476 // TODO: unsupported targets and formats | 476 // TODO: unsupported targets and formats |
477 | 477 |
478 } // namespace gles2 | 478 } // namespace gles2 |
479 } // namespace gpu | 479 } // namespace gpu |
OLD | NEW |