OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // A class to emulate GLES2 over command buffers. | 5 // A class to emulate GLES2 over command buffers. |
6 | 6 |
7 #include "../client/gles2_implementation.h" | 7 #include "../client/gles2_implementation.h" |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <queue> | 10 #include <queue> |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
634 reserved_ids_[1])); | 634 reserved_ids_[1])); |
635 #endif | 635 #endif |
636 } | 636 } |
637 | 637 |
638 GLES2Implementation::~GLES2Implementation() { | 638 GLES2Implementation::~GLES2Implementation() { |
639 #if defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS) | 639 #if defined(GLES2_SUPPORT_CLIENT_SIDE_ARRAYS) |
640 DeleteBuffers(arraysize(reserved_ids_), &reserved_ids_[0]); | 640 DeleteBuffers(arraysize(reserved_ids_), &reserved_ids_[0]); |
641 #endif | 641 #endif |
642 } | 642 } |
643 | 643 |
| 644 void GLES2Implementation::FreeUnusedSharedMemory() { |
| 645 mapped_memory_->FreeUnused(); |
| 646 } |
| 647 |
644 void GLES2Implementation::WaitForCmd() { | 648 void GLES2Implementation::WaitForCmd() { |
645 TRACE_EVENT0("gpu", "GLES2::WaitForCmd"); | 649 TRACE_EVENT0("gpu", "GLES2::WaitForCmd"); |
646 helper_->CommandBufferHelper::Finish(); | 650 helper_->CommandBufferHelper::Finish(); |
647 } | 651 } |
648 | 652 |
649 GLenum GLES2Implementation::GetError() { | 653 GLenum GLES2Implementation::GetError() { |
650 GPU_CLIENT_LOG("[" << this << "] glGetError()"); | 654 GPU_CLIENT_LOG("[" << this << "] glGetError()"); |
651 GLenum err = GetGLError(); | 655 GLenum err = GetGLError(); |
652 GPU_CLIENT_LOG("returned " << GLES2Util::GetStringError(err)); | 656 GPU_CLIENT_LOG("returned " << GLES2Util::GetStringError(err)); |
653 return err; | 657 return err; |
(...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2648 | 2652 |
2649 void GLES2Implementation::DestroyStreamTextureCHROMIUM(GLuint texture) { | 2653 void GLES2Implementation::DestroyStreamTextureCHROMIUM(GLuint texture) { |
2650 GPU_CLIENT_LOG("[" << this << "] DestroyStreamTextureCHROMIUM(" | 2654 GPU_CLIENT_LOG("[" << this << "] DestroyStreamTextureCHROMIUM(" |
2651 << texture << ")"); | 2655 << texture << ")"); |
2652 TRACE_EVENT0("gpu", "GLES2::DestroyStreamTextureCHROMIUM"); | 2656 TRACE_EVENT0("gpu", "GLES2::DestroyStreamTextureCHROMIUM"); |
2653 helper_->DestroyStreamTextureCHROMIUM(texture); | 2657 helper_->DestroyStreamTextureCHROMIUM(texture); |
2654 } | 2658 } |
2655 | 2659 |
2656 } // namespace gles2 | 2660 } // namespace gles2 |
2657 } // namespace gpu | 2661 } // namespace gpu |
OLD | NEW |