Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1115)

Side by Side Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 7890046: Command to mark surface inactive, so gpu process can release resources. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Flush only on hide Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 2471 matching lines...) Expand 10 before | Expand all | Expand 10 after
2482 helper_->CommandBufferHelper::Flush(); 2482 helper_->CommandBufferHelper::Flush();
2483 mapped_textures_.erase(it); 2483 mapped_textures_.erase(it);
2484 } 2484 }
2485 2485
2486 void GLES2Implementation::ResizeCHROMIUM(GLuint width, GLuint height) { 2486 void GLES2Implementation::ResizeCHROMIUM(GLuint width, GLuint height) {
2487 GPU_CLIENT_LOG("[" << this << "] glResizeCHROMIUM(" 2487 GPU_CLIENT_LOG("[" << this << "] glResizeCHROMIUM("
2488 << width << ", " << height << ")"); 2488 << width << ", " << height << ")");
2489 helper_->ResizeCHROMIUM(width, height); 2489 helper_->ResizeCHROMIUM(width, height);
2490 } 2490 }
2491 2491
2492 void GLES2Implementation::SetSurfaceVisibleCHROMIUM(GLboolean visible) {
2493 GPU_CLIENT_LOG("[" << this << "] glSetSurfaceVisibleCHROMIUM("
2494 << GLES2Util::GetStringBool(visible) << ")");
2495 helper_->SetSurfaceVisibleCHROMIUM(visible);
2496 }
2497
2492 const GLchar* GLES2Implementation::GetRequestableExtensionsCHROMIUM() { 2498 const GLchar* GLES2Implementation::GetRequestableExtensionsCHROMIUM() {
2493 GPU_CLIENT_LOG("[" << this << "] glGetRequestableExtensionsCHROMIUM()"); 2499 GPU_CLIENT_LOG("[" << this << "] glGetRequestableExtensionsCHROMIUM()");
2494 TRACE_EVENT0("gpu", 2500 TRACE_EVENT0("gpu",
2495 "GLES2Implementation::GetRequestableExtensionsCHROMIUM()"); 2501 "GLES2Implementation::GetRequestableExtensionsCHROMIUM()");
2496 const char* result = NULL; 2502 const char* result = NULL;
2497 // Clear the bucket so if the command fails nothing will be in it. 2503 // Clear the bucket so if the command fails nothing will be in it.
2498 helper_->SetBucketSize(kResultBucketId, 0); 2504 helper_->SetBucketSize(kResultBucketId, 0);
2499 helper_->GetRequestableExtensionsCHROMIUM(kResultBucketId); 2505 helper_->GetRequestableExtensionsCHROMIUM(kResultBucketId);
2500 std::string str; 2506 std::string str;
2501 if (GetBucketAsString(kResultBucketId, &str)) { 2507 if (GetBucketAsString(kResultBucketId, &str)) {
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
2648 2654
2649 void GLES2Implementation::DestroyStreamTextureCHROMIUM(GLuint texture) { 2655 void GLES2Implementation::DestroyStreamTextureCHROMIUM(GLuint texture) {
2650 GPU_CLIENT_LOG("[" << this << "] DestroyStreamTextureCHROMIUM(" 2656 GPU_CLIENT_LOG("[" << this << "] DestroyStreamTextureCHROMIUM("
2651 << texture << ")"); 2657 << texture << ")");
2652 TRACE_EVENT0("gpu", "GLES2::DestroyStreamTextureCHROMIUM"); 2658 TRACE_EVENT0("gpu", "GLES2::DestroyStreamTextureCHROMIUM");
2653 helper_->DestroyStreamTextureCHROMIUM(texture); 2659 helper_->DestroyStreamTextureCHROMIUM(texture);
2654 } 2660 }
2655 2661
2656 } // namespace gles2 2662 } // namespace gles2
2657 } // namespace gpu 2663 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698