diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/components/viz/common/quads | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/components/viz/common/quads')
5 files changed, 51 insertions, 4 deletions
diff --git a/chromium/components/viz/common/quads/compositor_frame_metadata.cc b/chromium/components/viz/common/quads/compositor_frame_metadata.cc index 96c246eeb84..c9709eae9de 100644 --- a/chromium/components/viz/common/quads/compositor_frame_metadata.cc +++ b/chromium/components/viz/common/quads/compositor_frame_metadata.cc @@ -22,6 +22,32 @@ CompositorFrameMetadata CompositorFrameMetadata::Clone() const { } CompositorFrameMetadata::CompositorFrameMetadata( - const CompositorFrameMetadata& other) = default; + const CompositorFrameMetadata& other) + : device_scale_factor(other.device_scale_factor), + root_scroll_offset(other.root_scroll_offset), + page_scale_factor(other.page_scale_factor), + scrollable_viewport_size(other.scrollable_viewport_size), + content_color_usage(other.content_color_usage), + may_contain_video(other.may_contain_video), + is_resourceless_software_draw_with_scroll_or_animation( + other.is_resourceless_software_draw_with_scroll_or_animation), + root_background_color(other.root_background_color), + latency_info(other.latency_info), + referenced_surfaces(other.referenced_surfaces), + activation_dependencies(other.activation_dependencies), + deadline(other.deadline), + begin_frame_ack(other.begin_frame_ack), + frame_token(other.frame_token), + send_frame_token_to_embedder(other.send_frame_token_to_embedder), + min_page_scale_factor(other.min_page_scale_factor), + top_controls_visible_height(other.top_controls_visible_height), + local_surface_id_allocation_time(other.local_surface_id_allocation_time), + preferred_frame_interval(other.preferred_frame_interval), + display_transform_hint(other.display_transform_hint) { + if (other.delegated_ink_metadata) { + delegated_ink_metadata = std::make_unique<DelegatedInkMetadata>( + *other.delegated_ink_metadata.get()); + } +} } // namespace viz diff --git a/chromium/components/viz/common/quads/compositor_frame_metadata.h b/chromium/components/viz/common/quads/compositor_frame_metadata.h index de4513fe572..06b680d5de5 100644 --- a/chromium/components/viz/common/quads/compositor_frame_metadata.h +++ b/chromium/components/viz/common/quads/compositor_frame_metadata.h @@ -11,6 +11,7 @@ #include "base/optional.h" #include "base/time/time.h" #include "build/build_config.h" +#include "components/viz/common/delegated_ink_metadata.h" #include "components/viz/common/frame_sinks/begin_frame_args.h" #include "components/viz/common/quads/frame_deadline.h" #include "components/viz/common/surfaces/surface_id.h" @@ -152,6 +153,19 @@ class VIZ_COMMON_EXPORT CompositorFrameMetadata { // applicable to frames of the root surface. gfx::OverlayTransform display_transform_hint = gfx::OVERLAY_TRANSFORM_NONE; + // Contains the metadata required for drawing a delegated ink trail onto the + // end of a rendered ink stroke. This should only be present when two + // conditions are met: + // 1. The JS API |updateInkTrailStartPoint| is used - This gathers the + // metadata and puts it onto a compositor frame to be sent to viz. + // 2. This frame will not be submitted to the root surface - The browser UI + // does not use this, and the frame must be contained within a + // SurfaceDrawQuad. + // The ink trail created with this metadata will only last for a single frame + // before it disappears, regardless of whether or not the next frame contains + // delegated ink metadata. + std::unique_ptr<DelegatedInkMetadata> delegated_ink_metadata; + private: CompositorFrameMetadata(const CompositorFrameMetadata& other); CompositorFrameMetadata operator=(const CompositorFrameMetadata&) = delete; diff --git a/chromium/components/viz/common/quads/draw_quad.cc b/chromium/components/viz/common/quads/draw_quad.cc index a0b0255820d..7de9198ef27 100644 --- a/chromium/components/viz/common/quads/draw_quad.cc +++ b/chromium/components/viz/common/quads/draw_quad.cc @@ -27,7 +27,9 @@ void DrawQuad::SetAll(const SharedQuadState* shared_quad_state, const gfx::Rect& rect, const gfx::Rect& visible_rect, bool needs_blending) { - DCHECK(rect.Contains(visible_rect)) + // TODO(boliu): Temporarily making this a release check to catch + // crbug.com/1072407. + CHECK(rect.Contains(visible_rect)) << "rect: " << rect.ToString() << " visible_rect: " << visible_rect.ToString(); diff --git a/chromium/components/viz/common/quads/draw_quad_unittest.cc b/chromium/components/viz/common/quads/draw_quad_unittest.cc index 32e4828180d..4ddc34dde7d 100644 --- a/chromium/components/viz/common/quads/draw_quad_unittest.cc +++ b/chromium/components/viz/common/quads/draw_quad_unittest.cc @@ -11,6 +11,7 @@ #include "base/bind.h" #include "base/compiler_specific.h" +#include "base/logging.h" #include "base/unguessable_token.h" #include "cc/base/math_util.h" #include "cc/paint/filter_operations.h" diff --git a/chromium/components/viz/common/quads/render_pass.cc b/chromium/components/viz/common/quads/render_pass.cc index 2e08e454b64..9ff21584a2f 100644 --- a/chromium/components/viz/common/quads/render_pass.cc +++ b/chromium/components/viz/common/quads/render_pass.cc @@ -229,7 +229,9 @@ void RenderPass::SetNew(uint64_t id, const gfx::Rect& output_rect, const gfx::Rect& damage_rect, const gfx::Transform& transform_to_root_target) { - DCHECK(id); + // TODO(boliu): Temporarily making this a release check to catch + // crbug.com/1072407. + CHECK(id); DCHECK(damage_rect.IsEmpty() || output_rect.Contains(damage_rect)) << "damage_rect: " << damage_rect.ToString() << " output_rect: " << output_rect.ToString(); @@ -256,7 +258,9 @@ void RenderPass::SetAll( bool cache_render_pass, bool has_damage_from_contributing_content, bool generate_mipmap) { - DCHECK(id); + // TODO(boliu): Temporarily making this a release check to catch + // crbug.com/1072407. + CHECK(id); this->id = id; this->output_rect = output_rect; |