OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 9015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9026 offscreen_target_color_texture_.get()); | 9026 offscreen_target_color_texture_.get()); |
9027 } | 9027 } |
9028 | 9028 |
9029 // Ensure the side effects of the copy are visible to the parent | 9029 // Ensure the side effects of the copy are visible to the parent |
9030 // context. There is no need to do this for ANGLE because it uses a | 9030 // context. There is no need to do this for ANGLE because it uses a |
9031 // single D3D device for all contexts. | 9031 // single D3D device for all contexts. |
9032 if (!feature_info_->feature_flags().is_angle) | 9032 if (!feature_info_->feature_flags().is_angle) |
9033 glFlush(); | 9033 glFlush(); |
9034 } | 9034 } |
9035 } else { | 9035 } else { |
9036 TRACE_EVENT2("gpu", "Onscreen", | |
9037 "width", surface_->GetSize().width(), | |
9038 "height", surface_->GetSize().height()); | |
9039 if (!surface_->SwapBuffers()) { | 9036 if (!surface_->SwapBuffers()) { |
9040 LOG(ERROR) << "Context lost because SwapBuffers failed."; | 9037 LOG(ERROR) << "Context lost because SwapBuffers failed."; |
9041 LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB); | 9038 LoseContext(GL_UNKNOWN_CONTEXT_RESET_ARB); |
9042 } | 9039 } |
9043 } | 9040 } |
9044 } | 9041 } |
9045 | 9042 |
9046 error::Error GLES2DecoderImpl::HandleEnableFeatureCHROMIUM( | 9043 error::Error GLES2DecoderImpl::HandleEnableFeatureCHROMIUM( |
9047 uint32 immediate_data_size, const cmds::EnableFeatureCHROMIUM& c) { | 9044 uint32 immediate_data_size, const cmds::EnableFeatureCHROMIUM& c) { |
9048 Bucket* bucket = GetBucket(c.bucket_id); | 9045 Bucket* bucket = GetBucket(c.bucket_id); |
(...skipping 1587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10636 DoDidUseTexImageIfNeeded(texture, texture->target()); | 10633 DoDidUseTexImageIfNeeded(texture, texture->target()); |
10637 } | 10634 } |
10638 | 10635 |
10639 // Include the auto-generated part of this file. We split this because it means | 10636 // Include the auto-generated part of this file. We split this because it means |
10640 // we can easily edit the non-auto generated parts right here in this file | 10637 // we can easily edit the non-auto generated parts right here in this file |
10641 // instead of having to edit some template or the code generator. | 10638 // instead of having to edit some template or the code generator. |
10642 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" | 10639 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" |
10643 | 10640 |
10644 } // namespace gles2 | 10641 } // namespace gles2 |
10645 } // namespace gpu | 10642 } // namespace gpu |
OLD | NEW |