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

Side by Side Diff: cc/output/direct_renderer.cc

Issue 1421483005: Reland: 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 | « cc/layers/video_layer_impl.cc ('k') | cc/output/gl_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "cc/output/direct_renderer.h" 5 #include "cc/output/direct_renderer.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 bool is_root_render_pass = 430 bool is_root_render_pass =
431 frame->current_render_pass == frame->root_render_pass; 431 frame->current_render_pass == frame->root_render_pass;
432 bool has_external_stencil_test = 432 bool has_external_stencil_test =
433 is_root_render_pass && output_surface_->HasExternalStencilTest(); 433 is_root_render_pass && output_surface_->HasExternalStencilTest();
434 bool should_clear_surface = 434 bool should_clear_surface =
435 !has_external_stencil_test && 435 !has_external_stencil_test &&
436 (!is_root_render_pass || settings_->should_clear_root_render_pass); 436 (!is_root_render_pass || settings_->should_clear_root_render_pass);
437 437
438 // If |has_external_stencil_test| we can't discard or clear. Make sure we 438 // If |has_external_stencil_test| we can't discard or clear. Make sure we
439 // don't need to. 439 // don't need to.
440 DCHECK_IMPLIES(has_external_stencil_test, 440 DCHECK(!has_external_stencil_test ||
441 !frame->current_render_pass->has_transparent_background); 441 !frame->current_render_pass->has_transparent_background);
442 442
443 SurfaceInitializationMode mode; 443 SurfaceInitializationMode mode;
444 if (should_clear_surface && render_pass_is_clipped) { 444 if (should_clear_surface && render_pass_is_clipped) {
445 mode = SURFACE_INITIALIZATION_MODE_SCISSORED_CLEAR; 445 mode = SURFACE_INITIALIZATION_MODE_SCISSORED_CLEAR;
446 } else if (should_clear_surface) { 446 } else if (should_clear_surface) {
447 mode = SURFACE_INITIALIZATION_MODE_FULL_SURFACE_CLEAR; 447 mode = SURFACE_INITIALIZATION_MODE_FULL_SURFACE_CLEAR;
448 } else { 448 } else {
449 mode = SURFACE_INITIALIZATION_MODE_PRESERVE; 449 mode = SURFACE_INITIALIZATION_MODE_PRESERVE;
450 } 450 }
451 451
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
536 ScopedResource* texture = render_pass_textures_.get(id); 536 ScopedResource* texture = render_pass_textures_.get(id);
537 return texture && texture->id(); 537 return texture && texture->id();
538 } 538 }
539 539
540 // static 540 // static
541 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) { 541 gfx::Size DirectRenderer::RenderPassTextureSize(const RenderPass* render_pass) {
542 return render_pass->output_rect.size(); 542 return render_pass->output_rect.size();
543 } 543 }
544 544
545 } // namespace cc 545 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/video_layer_impl.cc ('k') | cc/output/gl_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698