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

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

Issue 1213193003: Remove DCHECK_IMPLIES and CHECK_IMPLIES (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « content/common/gpu/client/gl_helper_scaling.cc ('k') | content/renderer/render_frame_impl.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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 pending_textures_.pop_front(); 191 pending_textures_.pop_front();
192 } 192 }
193 CompositorOutputSurface::OnSwapAck(output_surface_id, ack); 193 CompositorOutputSurface::OnSwapAck(output_surface_id, ack);
194 } 194 }
195 195
196 void MailboxOutputSurface::SwapBuffers(cc::CompositorFrame* frame) { 196 void MailboxOutputSurface::SwapBuffers(cc::CompositorFrame* frame) {
197 DCHECK(frame->gl_frame_data); 197 DCHECK(frame->gl_frame_data);
198 DCHECK(!surface_size_.IsEmpty()); 198 DCHECK(!surface_size_.IsEmpty());
199 DCHECK(surface_size_ == current_backing_.size); 199 DCHECK(surface_size_ == current_backing_.size);
200 DCHECK(frame->gl_frame_data->size == current_backing_.size); 200 DCHECK(frame->gl_frame_data->size == current_backing_.size);
201 DCHECK_IMPLIES(current_backing_.mailbox.IsZero(), 201 DCHECK(!current_backing_.mailbox.IsZero() ||
202 context_provider_->ContextGL()->GetGraphicsResetStatusKHR() != 202 context_provider_->ContextGL()->GetGraphicsResetStatusKHR() !=
203 GL_NO_ERROR); 203 GL_NO_ERROR);
204 204
205 frame->gl_frame_data->mailbox = current_backing_.mailbox; 205 frame->gl_frame_data->mailbox = current_backing_.mailbox;
206 context_provider_->ContextGL()->Flush(); 206 context_provider_->ContextGL()->Flush();
207 frame->gl_frame_data->sync_point = 207 frame->gl_frame_data->sync_point =
208 context_provider_->ContextGL()->InsertSyncPointCHROMIUM(); 208 context_provider_->ContextGL()->InsertSyncPointCHROMIUM();
209 CompositorOutputSurface::SwapBuffers(frame); 209 CompositorOutputSurface::SwapBuffers(frame);
210 210
211 pending_textures_.push_back(current_backing_); 211 pending_textures_.push_back(current_backing_);
212 current_backing_ = TransferableFrame(); 212 current_backing_ = TransferableFrame();
213 } 213 }
214 214
215 size_t MailboxOutputSurface::GetNumAcksPending() { 215 size_t MailboxOutputSurface::GetNumAcksPending() {
216 DCHECK(pending_textures_.size()); 216 DCHECK(pending_textures_.size());
217 return pending_textures_.size() - 1; 217 return pending_textures_.size() - 1;
218 } 218 }
219 219
220 } // namespace content 220 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/gl_helper_scaling.cc ('k') | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698