| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/context_group.h" | 5 #include "gpu/command_buffer/service/context_group.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 } | 283 } |
| 284 | 284 |
| 285 if (feature_info_->workarounds().max_texture_size) { | 285 if (feature_info_->workarounds().max_texture_size) { |
| 286 max_texture_size = std::min( | 286 max_texture_size = std::min( |
| 287 max_texture_size, | 287 max_texture_size, |
| 288 feature_info_->workarounds().max_texture_size); | 288 feature_info_->workarounds().max_texture_size); |
| 289 max_rectangle_texture_size = std::min( | 289 max_rectangle_texture_size = std::min( |
| 290 max_rectangle_texture_size, | 290 max_rectangle_texture_size, |
| 291 feature_info_->workarounds().max_texture_size); | 291 feature_info_->workarounds().max_texture_size); |
| 292 } | 292 } |
| 293 if (feature_info_->workarounds().max_cube_map_texture_size) { | |
| 294 max_cube_map_texture_size = std::min( | |
| 295 max_cube_map_texture_size, | |
| 296 feature_info_->workarounds().max_cube_map_texture_size); | |
| 297 } | |
| 298 | 293 |
| 299 texture_manager_.reset(new TextureManager(memory_tracker_.get(), | 294 texture_manager_.reset(new TextureManager(memory_tracker_.get(), |
| 300 feature_info_.get(), | 295 feature_info_.get(), |
| 301 max_texture_size, | 296 max_texture_size, |
| 302 max_cube_map_texture_size, | 297 max_cube_map_texture_size, |
| 303 max_rectangle_texture_size, | 298 max_rectangle_texture_size, |
| 304 max_3d_texture_size, | 299 max_3d_texture_size, |
| 305 max_array_texture_layers, | 300 max_array_texture_layers, |
| 306 bind_generates_resource_)); | 301 bind_generates_resource_)); |
| 307 texture_manager_->set_framebuffer_manager(framebuffer_manager_.get()); | 302 texture_manager_->set_framebuffer_manager(framebuffer_manager_.get()); |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 GLuint client_id, GLuint* service_id) const { | 592 GLuint client_id, GLuint* service_id) const { |
| 598 Buffer* buffer = buffer_manager_->GetBuffer(client_id); | 593 Buffer* buffer = buffer_manager_->GetBuffer(client_id); |
| 599 if (!buffer) | 594 if (!buffer) |
| 600 return false; | 595 return false; |
| 601 *service_id = buffer->service_id(); | 596 *service_id = buffer->service_id(); |
| 602 return true; | 597 return true; |
| 603 } | 598 } |
| 604 | 599 |
| 605 } // namespace gles2 | 600 } // namespace gles2 |
| 606 } // namespace gpu | 601 } // namespace gpu |
| OLD | NEW |