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

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

Issue 1285183008: Ozone integration. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: add missing license header Created 5 years, 4 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') | mojo/BUILD.gn » ('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 <list> 10 #include <list>
(...skipping 8204 matching lines...) Expand 10 before | Expand all | Expand 10 after
8215 } 8215 }
8216 bool is_tracing; 8216 bool is_tracing;
8217 TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("gpu.debug"), 8217 TRACE_EVENT_CATEGORY_GROUP_ENABLED(TRACE_DISABLED_BY_DEFAULT("gpu.debug"),
8218 &is_tracing); 8218 &is_tracing);
8219 if (is_tracing) { 8219 if (is_tracing) {
8220 bool is_offscreen = !!offscreen_target_frame_buffer_.get(); 8220 bool is_offscreen = !!offscreen_target_frame_buffer_.get();
8221 ScopedFrameBufferBinder binder(this, GetBackbufferServiceId()); 8221 ScopedFrameBufferBinder binder(this, GetBackbufferServiceId());
8222 gpu_state_tracer_->TakeSnapshotWithCurrentFramebuffer( 8222 gpu_state_tracer_->TakeSnapshotWithCurrentFramebuffer(
8223 is_offscreen ? offscreen_size_ : surface_->GetSize()); 8223 is_offscreen ? offscreen_size_ : surface_->GetSize());
8224 } 8224 }
8225 if (surface_->PostSubBuffer(c.x, c.y, c.width, c.height)) { 8225 if (surface_->PostSubBuffer(c.x, c.y, c.width, c.height) !=
8226 gfx::SwapResult::SWAP_FAILED) {
8226 return error::kNoError; 8227 return error::kNoError;
8227 } else { 8228 } else {
8228 LOG(ERROR) << "Context lost because PostSubBuffer failed."; 8229 LOG(ERROR) << "Context lost because PostSubBuffer failed.";
8229 return error::kLostContext; 8230 return error::kLostContext;
8230 } 8231 }
8231 } 8232 }
8232 8233
8233 error::Error GLES2DecoderImpl::HandleScheduleOverlayPlaneCHROMIUM( 8234 error::Error GLES2DecoderImpl::HandleScheduleOverlayPlaneCHROMIUM(
8234 uint32 immediate_data_size, 8235 uint32 immediate_data_size,
8235 const void* cmd_data) { 8236 const void* cmd_data) {
(...skipping 2104 matching lines...) Expand 10 before | Expand all | Expand 10 after
10340 offscreen_target_color_texture_.get()); 10341 offscreen_target_color_texture_.get());
10341 } 10342 }
10342 10343
10343 // Ensure the side effects of the copy are visible to the parent 10344 // Ensure the side effects of the copy are visible to the parent
10344 // context. There is no need to do this for ANGLE because it uses a 10345 // context. There is no need to do this for ANGLE because it uses a
10345 // single D3D device for all contexts. 10346 // single D3D device for all contexts.
10346 if (!feature_info_->gl_version_info().is_angle) 10347 if (!feature_info_->gl_version_info().is_angle)
10347 glFlush(); 10348 glFlush();
10348 } 10349 }
10349 } else { 10350 } else {
10350 if (!surface_->SwapBuffers()) { 10351 if (surface_->SwapBuffers() == gfx::SwapResult::SWAP_FAILED) {
10351 LOG(ERROR) << "Context lost because SwapBuffers failed."; 10352 LOG(ERROR) << "Context lost because SwapBuffers failed.";
10352 if (!CheckResetStatus()) { 10353 if (!CheckResetStatus()) {
10353 MarkContextLost(error::kUnknown); 10354 MarkContextLost(error::kUnknown);
10354 group_->LoseContexts(error::kUnknown); 10355 group_->LoseContexts(error::kUnknown);
10355 } 10356 }
10356 } 10357 }
10357 } 10358 }
10358 10359
10359 // This may be a slow command. Exit command processing to allow for 10360 // This may be a slow command. Exit command processing to allow for
10360 // context preemption and GPU watchdog checks. 10361 // context preemption and GPU watchdog checks.
(...skipping 2273 matching lines...) Expand 10 before | Expand all | Expand 10 after
12634 } 12635 }
12635 } 12636 }
12636 12637
12637 // Include the auto-generated part of this file. We split this because it means 12638 // Include the auto-generated part of this file. We split this because it means
12638 // we can easily edit the non-auto generated parts right here in this file 12639 // we can easily edit the non-auto generated parts right here in this file
12639 // instead of having to edit some template or the code generator. 12640 // instead of having to edit some template or the code generator.
12640 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h" 12641 #include "gpu/command_buffer/service/gles2_cmd_decoder_autogen.h"
12641 12642
12642 } // namespace gles2 12643 } // namespace gles2
12643 } // namespace gpu 12644 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gl_surface_mock.h ('k') | mojo/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698