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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 1166463004: Revert of Adding status to swap complete (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « gpu/command_buffer/service/gl_surface_mock.h ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <cmath> 10 #include <cmath>
(...skipping 8467 matching lines...) Expand 10 before | Expand all | Expand 10 after
8478 } 8478 }
8479 bool is_tracing; 8479 bool is_tracing;
8480 TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("gpu.debug"), 8480 TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("gpu.debug"),
8481 &is_tracing); 8481 &is_tracing);
8482 if (is_tracing) { 8482 if (is_tracing) {
8483 bool is_offscreen = !!offscreen_target_frame_buffer_.get(); 8483 bool is_offscreen = !!offscreen_target_frame_buffer_.get();
8484 ScopedFrameBufferBinder binder(this, GetBackbufferServiceId()); 8484 ScopedFrameBufferBinder binder(this, GetBackbufferServiceId());
8485 gpu_state_tracer_->TakeSnapshotWithCurrentFramebuffer( 8485 gpu_state_tracer_->TakeSnapshotWithCurrentFramebuffer(
8486 is_offscreen ? offscreen_size_ : surface_->GetSize()); 8486 is_offscreen ? offscreen_size_ : surface_->GetSize());
8487 } 8487 }
8488 if (surface_->PostSubBuffer(c.x, c.y, c.width, c.height) != 8488 if (surface_->PostSubBuffer(c.x, c.y, c.width, c.height)) {
8489 gfx::SwapResult::SWAP_FAILED) {
8490 return error::kNoError; 8489 return error::kNoError;
8491 } else { 8490 } else {
8492 LOG(ERROR) << "Context lost because PostSubBuffer failed."; 8491 LOG(ERROR) << "Context lost because PostSubBuffer failed.";
8493 return error::kLostContext; 8492 return error::kLostContext;
8494 } 8493 }
8495 } 8494 }
8496 8495
8497 error::Error GLES2DecoderImpl::HandleScheduleOverlayPlaneCHROMIUM( 8496 error::Error GLES2DecoderImpl::HandleScheduleOverlayPlaneCHROMIUM(
8498 uint32 immediate_data_size, 8497 uint32 immediate_data_size,
8499 const void* cmd_data) { 8498 const void* cmd_data) {
(...skipping 2512 matching lines...) Expand 10 before | Expand all | Expand 10 after
11012 offscreen_target_color_texture_.get()); 11011 offscreen_target_color_texture_.get());
11013 } 11012 }
11014 11013
11015 // Ensure the side effects of the copy are visible to the parent 11014 // Ensure the side effects of the copy are visible to the parent
11016 // context. There is no need to do this for ANGLE because it uses a 11015 // context. There is no need to do this for ANGLE because it uses a
11017 // single D3D device for all contexts. 11016 // single D3D device for all contexts.
11018 if (!feature_info_->gl_version_info().is_angle) 11017 if (!feature_info_->gl_version_info().is_angle)
11019 glFlush(); 11018 glFlush();
11020 } 11019 }
11021 } else { 11020 } else {
11022 if (surface_->SwapBuffers() == gfx::SwapResult::SWAP_FAILED) { 11021 if (!surface_->SwapBuffers()) {
11023 LOG(ERROR) << "Context lost because SwapBuffers failed."; 11022 LOG(ERROR) << "Context lost because SwapBuffers failed.";
11024 if (!CheckResetStatus()) { 11023 if (!CheckResetStatus()) {
11025 MarkContextLost(error::kUnknown); 11024 MarkContextLost(error::kUnknown);
11026 group_->LoseContexts(error::kUnknown); 11025 group_->LoseContexts(error::kUnknown);
11027 } 11026 }
11028 } 11027 }
11029 } 11028 }
11030 11029
11031 // This may be a slow command. Exit command processing to allow for 11030 // This may be a slow command. Exit command processing to allow for
11032 // context preemption and GPU watchdog checks. 11031 // context preemption and GPU watchdog checks.
(...skipping 2277 matching lines...) Expand 10 before | Expand all | Expand 10 after
13310 } 13309 }
13311 } 13310 }
13312 13311
13313 // Include the auto-generated part of this file. We split this because it means 13312 // Include the auto-generated part of this file. We split this because it means
13314 // we can easily edit the non-auto generated parts right here in this file 13313 // we can easily edit the non-auto generated parts right here in this file
13315 // instead of having to edit some template or the code generator. 13314 // instead of having to edit some template or the code generator.
13316 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 13315 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
13317 13316
13318 } // namespace gles2 13317 } // namespace gles2
13319 } // namespace gpu 13318 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gl_surface_mock.h ('k') | ui/gfx/gfx.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698