OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2730 // It's a new id so make a framebuffer info for it. | 2730 // It's a new id so make a framebuffer info for it. |
2731 glGenFramebuffersEXT(1, &service_id); | 2731 glGenFramebuffersEXT(1, &service_id); |
2732 CreateFramebufferInfo(client_id, service_id); | 2732 CreateFramebufferInfo(client_id, service_id); |
2733 info = GetFramebufferInfo(client_id); | 2733 info = GetFramebufferInfo(client_id); |
2734 IdAllocator* id_allocator = | 2734 IdAllocator* id_allocator = |
2735 group_->GetIdAllocator(id_namespaces::kFramebuffers); | 2735 group_->GetIdAllocator(id_namespaces::kFramebuffers); |
2736 id_allocator->MarkAsUsed(client_id); | 2736 id_allocator->MarkAsUsed(client_id); |
2737 } else { | 2737 } else { |
2738 service_id = info->service_id(); | 2738 service_id = info->service_id(); |
2739 } | 2739 } |
| 2740 } else { |
| 2741 service_id = context_->GetBackingFrameBufferObject(); |
2740 } | 2742 } |
2741 | 2743 |
2742 if (target == GL_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER_EXT) { | 2744 if (target == GL_FRAMEBUFFER || target == GL_DRAW_FRAMEBUFFER_EXT) { |
2743 bound_draw_framebuffer_ = info; | 2745 bound_draw_framebuffer_ = info; |
2744 } | 2746 } |
2745 if (target == GL_FRAMEBUFFER || target == GL_READ_FRAMEBUFFER_EXT) { | 2747 if (target == GL_FRAMEBUFFER || target == GL_READ_FRAMEBUFFER_EXT) { |
2746 bound_read_framebuffer_ = info; | 2748 bound_read_framebuffer_ = info; |
2747 } | 2749 } |
2748 | 2750 |
2749 // When rendering to an offscreen frame buffer, instead of unbinding from | 2751 // When rendering to an offscreen frame buffer, instead of unbinding from |
(...skipping 3249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5999 return error::kNoError; | 6001 return error::kNoError; |
6000 } | 6002 } |
6001 | 6003 |
6002 // Include the auto-generated part of this file. We split this because it means | 6004 // Include the auto-generated part of this file. We split this because it means |
6003 // we can easily edit the non-auto generated parts right here in this file | 6005 // we can easily edit the non-auto generated parts right here in this file |
6004 // instead of having to edit some template or the code generator. | 6006 // instead of having to edit some template or the code generator. |
6005 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 6007 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
6006 | 6008 |
6007 } // namespace gles2 | 6009 } // namespace gles2 |
6008 } // namespace gpu | 6010 } // namespace gpu |
OLD | NEW |