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

Side by Side Diff: content/renderer/gpu/mailbox_output_surface.cc

Issue 1417903005: Revert of Remove DCHECK_IMPLIES/CHECK_IMPLIES. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « content/common/gpu/media/vp9_decoder.cc ('k') | content/renderer/input/input_handler_proxy.cc » ('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 "content/renderer/gpu/mailbox_output_surface.h" 5 #include "content/renderer/gpu/mailbox_output_surface.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "cc/output/compositor_frame.h" 8 #include "cc/output/compositor_frame.h"
9 #include "cc/output/compositor_frame_ack.h" 9 #include "cc/output/compositor_frame_ack.h"
10 #include "cc/output/gl_frame_data.h" 10 #include "cc/output/gl_frame_data.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 pending_textures_.pop_front(); 193 pending_textures_.pop_front();
194 } 194 }
195 CompositorOutputSurface::OnSwapAck(output_surface_id, ack); 195 CompositorOutputSurface::OnSwapAck(output_surface_id, ack);
196 } 196 }
197 197
198 void MailboxOutputSurface::SwapBuffers(cc::CompositorFrame* frame) { 198 void MailboxOutputSurface::SwapBuffers(cc::CompositorFrame* frame) {
199 DCHECK(frame->gl_frame_data); 199 DCHECK(frame->gl_frame_data);
200 DCHECK(!surface_size_.IsEmpty()); 200 DCHECK(!surface_size_.IsEmpty());
201 DCHECK(surface_size_ == current_backing_.size); 201 DCHECK(surface_size_ == current_backing_.size);
202 DCHECK(frame->gl_frame_data->size == current_backing_.size); 202 DCHECK(frame->gl_frame_data->size == current_backing_.size);
203 DCHECK(!current_backing_.mailbox.IsZero() || 203 DCHECK_IMPLIES(current_backing_.mailbox.IsZero(),
204 context_provider_->ContextGL()->GetGraphicsResetStatusKHR() != 204 context_provider_->ContextGL()->GetGraphicsResetStatusKHR() !=
205 GL_NO_ERROR); 205 GL_NO_ERROR);
206 206
207 frame->gl_frame_data->mailbox = current_backing_.mailbox; 207 frame->gl_frame_data->mailbox = current_backing_.mailbox;
208 context_provider_->ContextGL()->Flush(); 208 context_provider_->ContextGL()->Flush();
209 frame->gl_frame_data->sync_point = 209 frame->gl_frame_data->sync_point =
210 context_provider_->ContextGL()->InsertSyncPointCHROMIUM(); 210 context_provider_->ContextGL()->InsertSyncPointCHROMIUM();
211 CompositorOutputSurface::SwapBuffers(frame); 211 CompositorOutputSurface::SwapBuffers(frame);
212 212
213 pending_textures_.push_back(current_backing_); 213 pending_textures_.push_back(current_backing_);
214 current_backing_ = TransferableFrame(); 214 current_backing_ = TransferableFrame();
215 } 215 }
216 216
217 size_t MailboxOutputSurface::GetNumAcksPending() { 217 size_t MailboxOutputSurface::GetNumAcksPending() {
218 DCHECK(pending_textures_.size()); 218 DCHECK(pending_textures_.size());
219 return pending_textures_.size() - 1; 219 return pending_textures_.size() - 1;
220 } 220 }
221 221
222 } // namespace content 222 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/media/vp9_decoder.cc ('k') | content/renderer/input/input_handler_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698