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 2501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2512 0, // level | 2512 0, // level |
2513 GL_RGBA, | 2513 GL_RGBA, |
2514 0, 0, // x, y | 2514 0, 0, // x, y |
2515 width, | 2515 width, |
2516 height, | 2516 height, |
2517 0); // border | 2517 0); // border |
2518 } | 2518 } |
2519 } | 2519 } |
2520 | 2520 |
2521 void GLES2DecoderImpl::DoResizeCHROMIUM(GLuint width, GLuint height) { | 2521 void GLES2DecoderImpl::DoResizeCHROMIUM(GLuint width, GLuint height) { |
2522 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 2522 #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(TOUCH_UI) |
2523 // Make sure that we are done drawing to the back buffer before resizing. | 2523 // Make sure that we are done drawing to the back buffer before resizing. |
2524 glFinish(); | 2524 glFinish(); |
2525 #endif | 2525 #endif |
2526 if (resize_callback_.get()) { | 2526 if (resize_callback_.get()) { |
2527 gfx::Size size(width, height); | 2527 gfx::Size size(width, height); |
2528 resize_callback_->Run(size); | 2528 resize_callback_->Run(size); |
2529 } | 2529 } |
2530 } | 2530 } |
2531 | 2531 |
2532 void GLES2DecoderImpl::DoSetSurfaceCHROMIUM(GLint surface_id) { | 2532 void GLES2DecoderImpl::DoSetSurfaceCHROMIUM(GLint surface_id) { |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2724 CreateFramebufferInfo(client_id, service_id); | 2724 CreateFramebufferInfo(client_id, service_id); |
2725 info = GetFramebufferInfo(client_id); | 2725 info = GetFramebufferInfo(client_id); |
2726 IdAllocator* id_allocator = | 2726 IdAllocator* id_allocator = |
2727 group_->GetIdAllocator(id_namespaces::kFramebuffers); | 2727 group_->GetIdAllocator(id_namespaces::kFramebuffers); |
2728 id_allocator->MarkAsUsed(client_id); | 2728 id_allocator->MarkAsUsed(client_id); |
2729 } else { | 2729 } else { |
2730 service_id = info->service_id(); | 2730 service_id = info->service_id(); |
2731 } | 2731 } |
2732 info->MarkAsValid(); | 2732 info->MarkAsValid(); |
2733 } else { | 2733 } else { |
2734 service_id = 0; | 2734 service_id = surface_->GetBackingFrameBufferObject(); |
2735 } | 2735 } |
2736 | 2736 |
2737 if (target == GL_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER_EXT) { | 2737 if (target == GL_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER_EXT) { |
2738 bound_draw_framebuffer_ = info; | 2738 bound_draw_framebuffer_ = info; |
2739 } | 2739 } |
2740 if (target == GL_FRAMEBUFFER || target == GL_READ_FRAMEBUFFER_EXT) { | 2740 if (target == GL_FRAMEBUFFER || target == GL_READ_FRAMEBUFFER_EXT) { |
2741 bound_read_framebuffer_ = info; | 2741 bound_read_framebuffer_ = info; |
2742 } | 2742 } |
2743 | 2743 |
2744 state_dirty_ = true; | 2744 state_dirty_ = true; |
(...skipping 3996 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6741 return false; | 6741 return false; |
6742 } | 6742 } |
6743 | 6743 |
6744 // Include the auto-generated part of this file. We split this because it means | 6744 // Include the auto-generated part of this file. We split this because it means |
6745 // we can easily edit the non-auto generated parts right here in this file | 6745 // we can easily edit the non-auto generated parts right here in this file |
6746 // instead of having to edit some template or the code generator. | 6746 // instead of having to edit some template or the code generator. |
6747 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 6747 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
6748 | 6748 |
6749 } // namespace gles2 | 6749 } // namespace gles2 |
6750 } // namespace gpu | 6750 } // namespace gpu |
OLD | NEW |