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

Side by Side Diff: cc/layers/video_layer_impl.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 | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/output/direct_renderer.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 "cc/layers/video_layer_impl.h" 5 #include "cc/layers/video_layer_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "cc/layers/video_frame_provider_client_impl.h" 9 #include "cc/layers/video_frame_provider_client_impl.h"
10 #include "cc/quads/io_surface_draw_quad.h" 10 #include "cc/quads/io_surface_draw_quad.h"
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 DCHECK(visible_rect.origin().IsOrigin()); 242 DCHECK(visible_rect.origin().IsOrigin());
243 DCHECK(visible_rect.size() == coded_size); 243 DCHECK(visible_rect.size() == coded_size);
244 uv_tex_size.SetSize((ya_tex_size.width() + 1) / 2, 244 uv_tex_size.SetSize((ya_tex_size.width() + 1) / 2,
245 (ya_tex_size.height() + 1) / 2); 245 (ya_tex_size.height() + 1) / 2);
246 } else { 246 } else {
247 uv_tex_size = media::VideoFrame::PlaneSize( 247 uv_tex_size = media::VideoFrame::PlaneSize(
248 frame_->format(), media::VideoFrame::kUPlane, coded_size); 248 frame_->format(), media::VideoFrame::kUPlane, coded_size);
249 DCHECK(uv_tex_size == 249 DCHECK(uv_tex_size ==
250 media::VideoFrame::PlaneSize( 250 media::VideoFrame::PlaneSize(
251 frame_->format(), media::VideoFrame::kVPlane, coded_size)); 251 frame_->format(), media::VideoFrame::kVPlane, coded_size));
252 DCHECK_IMPLIES( 252 DCHECK(frame_resources_.size() <= 3 ||
253 frame_resources_.size() > 3, 253 ya_tex_size == media::VideoFrame::PlaneSize(
254 ya_tex_size == 254 frame_->format(), media::VideoFrame::kAPlane,
255 media::VideoFrame::PlaneSize( 255 coded_size));
256 frame_->format(), media::VideoFrame::kAPlane, coded_size));
257 } 256 }
258 257
259 // Compute the UV sub-sampling factor based on the ratio between 258 // Compute the UV sub-sampling factor based on the ratio between
260 // |ya_tex_size| and |uv_tex_size|. 259 // |ya_tex_size| and |uv_tex_size|.
261 float uv_subsampling_factor_x = 260 float uv_subsampling_factor_x =
262 static_cast<float>(ya_tex_size.width()) / uv_tex_size.width(); 261 static_cast<float>(ya_tex_size.width()) / uv_tex_size.width();
263 float uv_subsampling_factor_y = 262 float uv_subsampling_factor_y =
264 static_cast<float>(ya_tex_size.height()) / uv_tex_size.height(); 263 static_cast<float>(ya_tex_size.height()) / uv_tex_size.height();
265 gfx::RectF ya_tex_coord_rect(visible_rect); 264 gfx::RectF ya_tex_coord_rect(visible_rect);
266 gfx::RectF uv_tex_coord_rect( 265 gfx::RectF uv_tex_coord_rect(
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 void VideoLayerImpl::SetNeedsRedraw() { 402 void VideoLayerImpl::SetNeedsRedraw() {
404 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds()))); 403 SetUpdateRect(gfx::UnionRects(update_rect(), gfx::Rect(bounds())));
405 layer_tree_impl()->SetNeedsRedraw(); 404 layer_tree_impl()->SetNeedsRedraw();
406 } 405 }
407 406
408 const char* VideoLayerImpl::LayerTypeAsString() const { 407 const char* VideoLayerImpl::LayerTypeAsString() const {
409 return "cc::VideoLayerImpl"; 408 return "cc::VideoLayerImpl";
410 } 409 }
411 410
412 } // namespace cc 411 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/picture_layer_impl_unittest.cc ('k') | cc/output/direct_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698