| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 uint32 total = 0; | 353 uint32 total = 0; |
| 354 if (buffer_manager_.get()) | 354 if (buffer_manager_.get()) |
| 355 total += buffer_manager_->mem_represented(); | 355 total += buffer_manager_->mem_represented(); |
| 356 if (renderbuffer_manager_.get()) | 356 if (renderbuffer_manager_.get()) |
| 357 total += renderbuffer_manager_->mem_represented(); | 357 total += renderbuffer_manager_->mem_represented(); |
| 358 if (texture_manager_.get()) | 358 if (texture_manager_.get()) |
| 359 total += texture_manager_->mem_represented(); | 359 total += texture_manager_->mem_represented(); |
| 360 return total; | 360 return total; |
| 361 } | 361 } |
| 362 | 362 |
| 363 void ContextGroup::LoseContexts(GLenum reset_status) { | 363 void ContextGroup::LoseContexts(error::ContextLostReason reason) { |
| 364 for (size_t ii = 0; ii < decoders_.size(); ++ii) { | 364 for (size_t ii = 0; ii < decoders_.size(); ++ii) { |
| 365 if (decoders_[ii].get()) { | 365 if (decoders_[ii].get()) { |
| 366 decoders_[ii]->LoseContext(reset_status); | 366 decoders_[ii]->MarkContextLost(reason); |
| 367 } | 367 } |
| 368 } | 368 } |
| 369 } | 369 } |
| 370 | 370 |
| 371 ContextGroup::~ContextGroup() { | 371 ContextGroup::~ContextGroup() { |
| 372 CHECK(!HaveContexts()); | 372 CHECK(!HaveContexts()); |
| 373 } | 373 } |
| 374 | 374 |
| 375 bool ContextGroup::CheckGLFeature(GLint min_required, GLint* v) { | 375 bool ContextGroup::CheckGLFeature(GLint min_required, GLint* v) { |
| 376 GLint value = *v; | 376 GLint value = *v; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 GLuint client_id, GLuint* service_id) const { | 411 GLuint client_id, GLuint* service_id) const { |
| 412 Buffer* buffer = buffer_manager_->GetBuffer(client_id); | 412 Buffer* buffer = buffer_manager_->GetBuffer(client_id); |
| 413 if (!buffer) | 413 if (!buffer) |
| 414 return false; | 414 return false; |
| 415 *service_id = buffer->service_id(); | 415 *service_id = buffer->service_id(); |
| 416 return true; | 416 return true; |
| 417 } | 417 } |
| 418 | 418 |
| 419 } // namespace gles2 | 419 } // namespace gles2 |
| 420 } // namespace gpu | 420 } // namespace gpu |
| OLD | NEW |