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 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
6 | 6 |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <list> | 10 #include <list> |
(...skipping 2508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2519 0, // level | 2519 0, // level |
2520 GL_RGBA, | 2520 GL_RGBA, |
2521 0, 0, // x, y | 2521 0, 0, // x, y |
2522 width, | 2522 width, |
2523 height, | 2523 height, |
2524 0); // border | 2524 0); // border |
2525 } | 2525 } |
2526 } | 2526 } |
2527 | 2527 |
2528 void GLES2DecoderImpl::DoResizeCHROMIUM(GLuint width, GLuint height) { | 2528 void GLES2DecoderImpl::DoResizeCHROMIUM(GLuint width, GLuint height) { |
2529 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 2529 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(TOUCH_UI) |
2530 // Make sure that we are done drawing to the back buffer before resizing. | 2530 // Make sure that we are done drawing to the back buffer before resizing. |
2531 glFinish(); | 2531 glFinish(); |
2532 #endif | 2532 #endif |
2533 if (resize_callback_.get()) { | 2533 if (resize_callback_.get()) { |
2534 gfx::Size size(width, height); | 2534 gfx::Size size(width, height); |
2535 resize_callback_->Run(size); | 2535 resize_callback_->Run(size); |
2536 } | 2536 } |
2537 } | 2537 } |
2538 | 2538 |
2539 void GLES2DecoderImpl::DoSetSurfaceCHROMIUM(GLint surface_id) { | 2539 void GLES2DecoderImpl::DoSetSurfaceCHROMIUM(GLint surface_id) { |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2731 CreateFramebufferInfo(client_id, service_id); | 2731 CreateFramebufferInfo(client_id, service_id); |
2732 info = GetFramebufferInfo(client_id); | 2732 info = GetFramebufferInfo(client_id); |
2733 IdAllocator* id_allocator = | 2733 IdAllocator* id_allocator = |
2734 group_->GetIdAllocator(id_namespaces::kFramebuffers); | 2734 group_->GetIdAllocator(id_namespaces::kFramebuffers); |
2735 id_allocator->MarkAsUsed(client_id); | 2735 id_allocator->MarkAsUsed(client_id); |
2736 } else { | 2736 } else { |
2737 service_id = info->service_id(); | 2737 service_id = info->service_id(); |
2738 } | 2738 } |
2739 info->MarkAsValid(); | 2739 info->MarkAsValid(); |
2740 } else { | 2740 } else { |
2741 service_id = 0; | 2741 service_id = surface_->GetBackingFrameBufferObject(); |
2742 } | 2742 } |
2743 | 2743 |
2744 if (target == GL_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER_EXT) { | 2744 if (target == GL_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER_EXT) { |
2745 bound_draw_framebuffer_ = info; | 2745 bound_draw_framebuffer_ = info; |
2746 } | 2746 } |
2747 if (target == GL_FRAMEBUFFER || target == GL_READ_FRAMEBUFFER_EXT) { | 2747 if (target == GL_FRAMEBUFFER || target == GL_READ_FRAMEBUFFER_EXT) { |
2748 bound_read_framebuffer_ = info; | 2748 bound_read_framebuffer_ = info; |
2749 } | 2749 } |
2750 | 2750 |
2751 state_dirty_ = true; | 2751 state_dirty_ = true; |
(...skipping 4046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6798 return false; | 6798 return false; |
6799 } | 6799 } |
6800 | 6800 |
6801 // Include the auto-generated part of this file. We split this because it means | 6801 // Include the auto-generated part of this file. We split this because it means |
6802 // we can easily edit the non-auto generated parts right here in this file | 6802 // we can easily edit the non-auto generated parts right here in this file |
6803 // instead of having to edit some template or the code generator. | 6803 // instead of having to edit some template or the code generator. |
6804 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 6804 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
6805 | 6805 |
6806 } // namespace gles2 | 6806 } // namespace gles2 |
6807 } // namespace gpu | 6807 } // namespace gpu |
OLD | NEW |