From 02c62914cf50fcd4df2eef6550fa0639d3b9303e Mon Sep 17 00:00:00 2001 From: Daniil Ruban Date: Thu, 7 Mar 2024 13:06:05 +0100 Subject: [PATCH 01/16] Fix build x86_64 and i586 * Removes constexpr in `v8/src/codegen/x64/assembler-x64.h` and `v8/src/wasm/baseline/x64/liftoff-assembler-x64-inl.h` Change-Id: I5d50bdf03f544d25d111df83a99dfb10fb362d8d --- v8/src/codegen/x64/assembler-x64.h | 12 ++++++++-- .../wasm/baseline/x64/liftoff-assembler-x64-inl.h | 26 ++++++++++++++++++++-- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/v8/src/codegen/x64/assembler-x64.h b/v8/src/codegen/x64/assembler-x64.h index e4ba454..f7f1596 100644 --- a/v8/src/codegen/x64/assembler-x64.h +++ b/v8/src/codegen/x64/assembler-x64.h @@ -219,7 +219,11 @@ class V8_EXPORT_PRIVATE Operand { "Length must be aligned for fast access."); // [base + disp/r] - V8_INLINE constexpr Operand(Register base, int32_t disp) { + V8_INLINE +#if !defined(__GNUC__) || defined(__clang__) + constexpr +#endif + Operand(Register base, int32_t disp) { if (base == rsp || base == r12) { // SIB byte is needed to encode (rsp + offset) or (r12 + offset). set_sib(times_1, rsp, base); @@ -328,7 +332,11 @@ class V8_EXPORT_PRIVATE Operand { memory_.len = 2; } - V8_INLINE constexpr void set_disp8(int disp) { + V8_INLINE +#if !defined(__GNUC__) || defined(__clang__) + constexpr +#endif + void set_disp8(int disp) { V8_ASSUME(memory_.len == 1 || memory_.len == 2); DCHECK(is_int8(disp)); memory_.buf[memory_.len] = disp; diff --git a/v8/src/wasm/baseline/x64/liftoff-assembler-x64-inl.h b/v8/src/wasm/baseline/x64/liftoff-assembler-x64-inl.h index 74b6da2..fbbc754 100644 --- a/v8/src/wasm/baseline/x64/liftoff-assembler-x64-inl.h +++ b/v8/src/wasm/baseline/x64/liftoff-assembler-x64-inl.h @@ -48,13 +48,19 @@ constexpr int kInstanceOffset = 16; // rbp-24 is the feedback vector. constexpr int kFeedbackVectorOffset = 24; -inline constexpr Operand GetStackSlot(int offset) { +inline +#if !defined(__GNUC__) || defined(__clang__) + constexpr +#endif +Operand GetStackSlot(int offset) { return Operand(rbp, -offset); } +#if !defined(__GNUC__) || defined(__clang__) constexpr Operand kInstanceOperand = GetStackSlot(kInstanceOffset); constexpr Operand kOSRTargetSlot = GetStackSlot(kOSRTargetOffset); +#endif inline Operand GetMemOp(LiftoffAssembler* assm, Register addr, Register offset_reg, uintptr_t offset_imm, @@ -287,7 +293,7 @@ void LiftoffAssembler::AbortCompilation() {} // static constexpr int LiftoffAssembler::StaticStackFrameSize() { - return kOSRTargetOffset; + return v8::internal::wasm::kOSRTargetOffset; } int LiftoffAssembler::SlotSizeForType(ValueKind kind) { @@ -341,7 +347,11 @@ void LiftoffAssembler::LoadConstant(LiftoffRegister reg, WasmValue value) { } void LiftoffAssembler::LoadInstanceFromFrame(Register dst) { +#if !defined(__GNUC__) || defined(__clang__) movq(dst, liftoff::kInstanceOperand); +#else + movq(dst, liftoff::GetStackSlot(liftoff::kInstanceOffset)); +#endif } void LiftoffAssembler::LoadFromInstance(Register dst, Register instance, @@ -388,11 +398,19 @@ void LiftoffAssembler::LoadExternalPointer(Register dst, Register src_addr, } void LiftoffAssembler::SpillInstance(Register instance) { +#if !defined(__GNUC__) || defined(__clang__) movq(liftoff::kInstanceOperand, instance); +#else + movq(liftoff::GetStackSlot(liftoff::kInstanceOffset), instance); +#endif } void LiftoffAssembler::ResetOSRTarget() { +#if !defined(__GNUC__) || defined(__clang__) movq(liftoff::kOSRTargetSlot, Immediate(0)); +#else + movq(liftoff::GetStackSlot(v8::internal::wasm::kOSRTargetOffset), Immediate(0)); +#endif } void LiftoffAssembler::LoadTaggedPointer(Register dst, Register src_addr, @@ -4360,7 +4378,11 @@ void LiftoffAssembler::DeallocateStackSlot(uint32_t size) { } void LiftoffAssembler::MaybeOSR() { +#if !defined(__GNUC__) || defined(__clang__) cmpq(liftoff::kOSRTargetSlot, Immediate(0)); +#else + cmpq(liftoff::GetStackSlot(v8::internal::wasm::kOSRTargetOffset), Immediate(0)); +#endif j(not_equal, static_cast
(Builtin::kWasmOnStackReplace), RelocInfo::WASM_STUB_CALL); } -- 2.7.4 From 3c23d361adfa1a10c754278b27a77ad2ebe30996 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=9Awiniarski?= Date: Fri, 8 Mar 2024 12:07:37 +0100 Subject: [PATCH 02/16] Fix RiscV support - Rendering issue for armv7l MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Commit fixes change introduced in RiscV support for M120. On armv7l (built with ./tizen_src/build/build_standard_armv7l) the lack of specialized template of SerializedSizeSimple() for size_t caused rendering issue and usage of illegal instruction when running chromium-efl for armv7l. Specialization was originally commented out due to compliation error caused by gcc bug that does not allow declaration of specialized template outside of the namespace. Now the specialization is introduced in template where it will return appropriate value depending on the type of typename T Change-Id: If713bd0c0d6c1a0ed91cc2f627c314a20471ceb7 Signed-off-by: Aleksander Świniarski --- cc/paint/paint_op_writer.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/cc/paint/paint_op_writer.h b/cc/paint/paint_op_writer.h index f545378..1eae1b9 100644 --- a/cc/paint/paint_op_writer.h +++ b/cc/paint/paint_op_writer.h @@ -118,16 +118,16 @@ class CC_PAINT_EXPORT PaintOpWriter { template static constexpr size_t SerializedSizeSimple() { static_assert(!std::is_pointer_v); - return base::bits::AlignUp(sizeof(T), kDefaultAlignment); + if constexpr (std::is_same_v) { + // size_t is always serialized as two uint32_ts to make the serialized + // result portable between 32bit and 64bit processes. + return base::bits::AlignUp(2 * sizeof(uint32_t), kDefaultAlignment); + } else { + static_assert(!std::is_pointer_v); + return base::bits::AlignUp(sizeof(T), kDefaultAlignment); + } } - // FIXME - // size_t is always serialized as two uint32_ts to make the serialized result - // portable between 32bit and 64bit processes. - // template <> - // constexpr size_t SerializedSizeSimple() { - // return base::bits::AlignUp(2 * sizeof(uint32_t), kDefaultAlignment); - // } #endif public: // SerializedSize() returns the maximum serialized size of the given type or -- 2.7.4 From 02212222f3d3d848b0eff29c0ce8421e469a8b1c Mon Sep 17 00:00:00 2001 From: Manjeet Date: Thu, 7 Mar 2024 00:43:13 +0530 Subject: [PATCH 03/16] [M120 Migration] Remove EWK_BRINGUP from ContextMenuControllerEfl. DownloadUrlParameters::set_referrer() was split into set_referrer() and set_referrer_policy() by upstream. So, this patch updates the code accordingly. Reference: https://review.tizen.org/gerrit/291846 Change-Id: Ie665d9f1b971d5da2a89a2487efbec93970051cb Signed-off-by: Manjeet --- tizen_src/ewk/efl_integration/context_menu_controller_efl.cc | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc b/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc index f68da48..8519b73 100644 --- a/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc +++ b/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc @@ -341,12 +341,9 @@ base::FilePath ContextMenuControllerEfl::DownloadFile( url, frame_host->GetProcess()->GetID(), frame_host->GetRoutingID(), MISSING_TRAFFIC_ANNOTATION); dl_params->set_post_id(-1); -#if !defined(EWK_BRINGUP) // FIXME: m67 bringup - dl_params->set_referrer( - content::Referrer(referrer, blink::kWebReferrerPolicyAlways)); -#else dl_params->set_referrer(referrer); -#endif + dl_params->set_referrer_policy(Referrer::ReferrerPolicyForUrlRequest( + network::mojom::ReferrerPolicy::kAlways)); dl_params->set_referrer_encoding("utf8"); base::FilePath fileName; if (suggested_filename.empty()) -- 2.7.4 From 2372d61972cd16d3b9b0191f8995c86c9bef91d2 Mon Sep 17 00:00:00 2001 From: Manjeet Date: Fri, 8 Mar 2024 15:41:49 +0530 Subject: [PATCH 04/16] [M120 Migration] Fix build warning The following patch fixes a compilation warning [1] that occurs during tv build. [1] "warning: comparison of integers of different signs: 'int' and 'unsigned int'" The upper limit of unsigned int and int are different, so in extreme cases where value of a variable falls in between the upper limit of int and unsigned int, leads to an infinite loop. Reference: https://review.tizen.org/gerrit/293395 Change-Id: I7921ffb6a949b7f9c522889e35c9cd9d48268b26 Signed-off-by: Manjeet --- media/filters/source_buffer_range.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/media/filters/source_buffer_range.cc b/media/filters/source_buffer_range.cc index fdc106c..b5e8f47 100644 --- a/media/filters/source_buffer_range.cc +++ b/media/filters/source_buffer_range.cc @@ -200,7 +200,8 @@ void SourceBufferRange::ModifyFirstFrameForMpeghCodec() { // This is used to check whether we do not try to add starting sequence to // frame that already had it added while demuxing ie. first uploaded frame bool is_starting_sequence_already_present = true; - for (int i = 0; i < start_sequence.size() && i < old_data_size; i++) { + for (unsigned int i = 0; i < start_sequence.size() && i < old_data_size; + i++) { if (start_sequence[i] != old_data_[i]) { is_starting_sequence_already_present = false; break; @@ -217,12 +218,14 @@ void SourceBufferRange::ModifyFirstFrameForMpeghCodec() { // Starting sequence inserted in front of new data // new_data.insert(new_data.begin(),start_sequence.begin(),start_sequence.end()); - for (int i = 0; i < start_sequence.size(); i++) + for (unsigned int i = 0; i < start_sequence.size(); i++) { new_data[i] = start_sequence[i]; + } // Loop copying old data to new container - for (int i = 0; i < old_data_size; i++) + for (unsigned int i = 0; i < old_data_size; i++) { new_data[i + start_sequence.size()] = old_data_[i]; + } // Creating new buffer based on changed data auto new_buffer = StreamParserBuffer::CopyFrom( -- 2.7.4 From 79d02891d2a191517604183b0feaaa7665cff409 Mon Sep 17 00:00:00 2001 From: YongGeol Jung Date: Mon, 4 Mar 2024 22:48:04 -0800 Subject: [PATCH 05/16] Remove unneeded lib dependency. |boost_system| library is not used in chromium and related dependency from |wgt-manifest-handlers| is also removed. Change-Id: I6feab2e921c816c8b588c7a0d6fc8c4d03b0c29b Signed-off-by: YongGeol Jung --- wrt/BUILD.gn | 3 --- 1 file changed, 3 deletions(-) diff --git a/wrt/BUILD.gn b/wrt/BUILD.gn index ed7e1d7..2c97238 100644 --- a/wrt/BUILD.gn +++ b/wrt/BUILD.gn @@ -299,9 +299,6 @@ config("wrt_config") { ] } - ldflags = [ - "-lboost_system", # For avoid link order issue - ] if (use_lto) { ldflags += [ "-lm" ] } -- 2.7.4 From 1127f40357a6cf12284e61ac40f15234c9ed7025 Mon Sep 17 00:00:00 2001 From: uzair Date: Mon, 17 Apr 2023 08:30:14 +0530 Subject: [PATCH 06/16] [M120 Migration] Skip flushAndSubmit sync call on gpu side for webgl This commit enables flushAndSubmit sync call in gpu process for all types of content excluding canvas and video which helps fixing blackcsreen issues observed during alexa testing. Reference: https://review.tizen.org/gerrit/c/291434 Change-Id: Id473d14e22bf8089e0017906e7b806ec215af595 Signed-off-by: uzair Signed-off-by: Chandan Padhi --- cc/layers/layer_impl.h | 14 ++++++++++++++ cc/layers/texture_layer_impl.h | 4 ++++ cc/layers/video_layer_impl.h | 4 ++++ cc/trees/layer_tree_host_impl.cc | 11 +++++++++++ cc/trees/layer_tree_host_impl.h | 4 ++++ cc/trees/layer_tree_impl.cc | 10 ++++++++++ cc/trees/layer_tree_impl.h | 3 +++ components/viz/common/quads/compositor_frame_metadata.cc | 3 +++ components/viz/common/quads/compositor_frame_metadata.h | 4 ++++ components/viz/service/display/aggregated_frame.h | 4 ++++ components/viz/service/display/direct_renderer.h | 5 +++++ components/viz/service/display/display.cc | 5 +++++ components/viz/service/display/output_surface_frame.h | 3 +++ components/viz/service/display/skia_renderer.cc | 3 +++ components/viz/service/display/surface_aggregator.cc | 12 ++++++++++++ .../display_embedder/skia_output_device_offscreen.cc | 4 ++-- .../compositing/compositor_frame_metadata_mojom_traits.cc | 3 +++ .../compositing/compositor_frame_metadata_mojom_traits.h | 6 ++++++ services/viz/public/mojom/BUILD.gn | 4 ++++ .../mojom/compositing/compositor_frame_metadata.mojom | 4 ++++ 20 files changed, 108 insertions(+), 2 deletions(-) diff --git a/cc/layers/layer_impl.h b/cc/layers/layer_impl.h index 9660e89..20c3639 100644 --- a/cc/layers/layer_impl.h +++ b/cc/layers/layer_impl.h @@ -68,6 +68,16 @@ enum ViewportLayerType { LAST_VIEWPORT_LAYER_TYPE = OUTER_VIEWPORT_SCROLL, }; +#if BUILDFLAG(IS_EFL) +enum LayerType { + LAYER_TYPE_NORMAL = 1, + LAYER_TYPE_TEXTURE = 1 << 1, + LAYER_TYPE_VIDEO = 1 << 2 +}; + +typedef unsigned LayerTypeMask; +#endif + class CC_EXPORT LayerImpl { public: static std::unique_ptr Create(LayerTreeImpl* tree_impl, int id) { @@ -445,6 +455,10 @@ class CC_EXPORT LayerImpl { ElementListType GetElementTypeForAnimation() const; +#if BUILDFLAG(IS_EFL) + virtual LayerType GetLayerType() const { return LAYER_TYPE_NORMAL; } +#endif + void set_needs_show_scrollbars(bool yes) { needs_show_scrollbars_ = yes; } bool needs_show_scrollbars() { return needs_show_scrollbars_; } diff --git a/cc/layers/texture_layer_impl.h b/cc/layers/texture_layer_impl.h index 0e66134..4ab8f18 100644 --- a/cc/layers/texture_layer_impl.h +++ b/cc/layers/texture_layer_impl.h @@ -77,6 +77,10 @@ class CC_EXPORT TextureLayerImpl : public LayerImpl { scoped_refptr bitmap); void UnregisterSharedBitmapId(viz::SharedBitmapId id); +#if BUILDFLAG(IS_EFL) + LayerType GetLayerType() const override { return LAYER_TYPE_TEXTURE; } +#endif + private: TextureLayerImpl(LayerTreeImpl* tree_impl, int id); diff --git a/cc/layers/video_layer_impl.h b/cc/layers/video_layer_impl.h index de261d5..4aac591 100644 --- a/cc/layers/video_layer_impl.h +++ b/cc/layers/video_layer_impl.h @@ -65,6 +65,10 @@ class CC_EXPORT VideoLayerImpl : public LayerImpl { return video_transform_; } +#if BUILDFLAG(IS_EFL) + LayerType GetLayerType() const override { return LAYER_TYPE_VIDEO; } +#endif + private: VideoLayerImpl( LayerTreeImpl* tree_impl, diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc index 5dddca5..38e0e67 100644 --- a/cc/trees/layer_tree_host_impl.cc +++ b/cc/trees/layer_tree_host_impl.cc @@ -2371,6 +2371,9 @@ viz::CompositorFrameMetadata LayerTreeHostImpl::MakeCompositorFrameMetadata() { } metadata.capture_bounds = CollectRegionCaptureBounds(); +#if BUILDFLAG(IS_EFL) + metadata.can_skip_flush = CanSkipFlush(); +#endif return metadata; } @@ -2618,6 +2621,14 @@ absl::optional LayerTreeHostImpl::DrawLayers( return SubmitInfo{submit_time, std::move(events_metrics)}; } +#if BUILDFLAG(IS_EFL) +bool LayerTreeHostImpl::CanSkipFlush() const { + if (active_tree_->HasLayer(LAYER_TYPE_TEXTURE | LAYER_TYPE_VIDEO)) + return true; + return false; +} +#endif + viz::CompositorFrame LayerTreeHostImpl::GenerateCompositorFrame( FrameData* frame) { TRACE_EVENT( diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h index eabafd4..593823d0 100644 --- a/cc/trees/layer_tree_host_impl.h +++ b/cc/trees/layer_tree_host_impl.h @@ -316,6 +316,10 @@ class CC_EXPORT LayerTreeHostImpl : public TileManagerClient, void RequestBeginFrameForAnimatedImages() override; void RequestInvalidationForAnimatedImages() override; +#if BUILDFLAG(IS_EFL) + bool CanSkipFlush() const; +#endif + base::WeakPtr AsWeakPtr(); void set_resourceless_software_draw_for_testing() { diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc index d62ca5c..b7f10da 100644 --- a/cc/trees/layer_tree_impl.cc +++ b/cc/trees/layer_tree_impl.cc @@ -1955,6 +1955,16 @@ void LayerTreeImpl::DidAnimateScrollOffset() { host_impl_->DidAnimateScrollOffset(); } +#if BUILDFLAG(IS_EFL) +bool LayerTreeImpl::HasLayer(LayerTypeMask layer_type_mask) const { + for (auto& layer : layer_list_) { + if (layer_type_mask & layer->GetLayerType()) + return true; + } + return false; +} +#endif + bool LayerTreeImpl::use_gpu_rasterization() const { return host_impl_->use_gpu_rasterization(); } diff --git a/cc/trees/layer_tree_impl.h b/cc/trees/layer_tree_impl.h index 94b9364..6c3991a 100644 --- a/cc/trees/layer_tree_impl.h +++ b/cc/trees/layer_tree_impl.h @@ -151,6 +151,9 @@ class CC_EXPORT LayerTreeImpl { std::unique_ptr CreateScrollbarAnimationController(ElementId scroll_element_id, float initial_opacity); +#if BUILDFLAG(IS_EFL) + bool HasLayer(LayerTypeMask) const; +#endif void DidAnimateScrollOffset(); bool use_gpu_rasterization() const; bool create_low_res_tiling() const; diff --git a/components/viz/common/quads/compositor_frame_metadata.cc b/components/viz/common/quads/compositor_frame_metadata.cc index f227686..ce691bb 100644 --- a/components/viz/common/quads/compositor_frame_metadata.cc +++ b/components/viz/common/quads/compositor_frame_metadata.cc @@ -29,6 +29,9 @@ CompositorFrameMetadata::CompositorFrameMetadata( scrollable_viewport_size(other.scrollable_viewport_size), content_color_usage(other.content_color_usage), may_contain_video(other.may_contain_video), +#if BUILDFLAG(IS_EFL) + can_skip_flush(other.can_skip_flush), +#endif is_resourceless_software_draw_with_scroll_or_animation( other.is_resourceless_software_draw_with_scroll_or_animation), is_handling_interaction(other.is_handling_interaction), diff --git a/components/viz/common/quads/compositor_frame_metadata.h b/components/viz/common/quads/compositor_frame_metadata.h index 42c9bfa..fc07196 100644 --- a/components/viz/common/quads/compositor_frame_metadata.h +++ b/components/viz/common/quads/compositor_frame_metadata.h @@ -88,6 +88,10 @@ class VIZ_COMMON_EXPORT CompositorFrameMetadata { bool may_contain_video = false; +#if BUILDFLAG(IS_EFL) + bool can_skip_flush = false; +#endif + bool may_throttle_if_undrawn_frames = true; // WebView makes quality decisions for rastering resourceless software frames diff --git a/components/viz/service/display/aggregated_frame.h b/components/viz/service/display/aggregated_frame.h index 054b7a0..5420267 100644 --- a/components/viz/service/display/aggregated_frame.h +++ b/components/viz/service/display/aggregated_frame.h @@ -50,6 +50,10 @@ class VIZ_SERVICE_EXPORT AggregatedFrame { // root render pass |output_rect| (display size) on the root surface. bool page_fullscreen_mode = false; +#if BUILDFLAG(IS_EFL) + bool can_skip_flush = false; +#endif + // A list of surface damage rects in the current frame, used for overlays. SurfaceDamageRectList surface_damage_rect_list_; diff --git a/components/viz/service/display/direct_renderer.h b/components/viz/service/display/direct_renderer.h index c242001..ae134eb 100644 --- a/components/viz/service/display/direct_renderer.h +++ b/components/viz/service/display/direct_renderer.h @@ -110,6 +110,11 @@ class VIZ_SERVICE_EXPORT DirectRenderer { std::vector latency_info; int64_t seq = -1; bool top_controls_visible_height_changed = false; + +#if BUILDFLAG(IS_EFL) + bool can_skip_flush = false; +#endif + #if BUILDFLAG(IS_APPLE) gfx::CALayerResult ca_layer_error_code = gfx::kCALayerSuccess; #endif diff --git a/components/viz/service/display/display.cc b/components/viz/service/display/display.cc index d61a94f..c87b56b 100644 --- a/components/viz/service/display/display.cc +++ b/components/viz/service/display/display.cc @@ -1020,6 +1020,11 @@ bool Display::DrawAndSwap(const DrawAndSwapParams& params) { data->set_display_trace_id(swap_trace_id); }); + +#if BUILDFLAG(IS_EFL) + swap_frame_data.can_skip_flush = frame.can_skip_flush; +#endif + #if BUILDFLAG(IS_APPLE) swap_frame_data.ca_layer_error_code = overlay_processor_->GetCALayerErrorCode(); diff --git a/components/viz/service/display/output_surface_frame.h b/components/viz/service/display/output_surface_frame.h index 45f45bb..99dd611 100644 --- a/components/viz/service/display/output_surface_frame.h +++ b/components/viz/service/display/output_surface_frame.h @@ -43,6 +43,9 @@ class VIZ_SERVICE_EXPORT OutputSurfaceFrame { std::vector latency_info; absl::optional choreographer_vsync_id; bool top_controls_visible_height_changed = false; +#if BUILDFLAG(IS_EFL) + bool can_skip_flush = false; +#endif // FrameData for GLSurface. gfx::FrameData data; // Metadata containing information to draw a delegated ink trail using diff --git a/components/viz/service/display/skia_renderer.cc b/components/viz/service/display/skia_renderer.cc index c54bfa3..eba8513 100644 --- a/components/viz/service/display/skia_renderer.cc +++ b/components/viz/service/display/skia_renderer.cc @@ -1089,6 +1089,9 @@ void SkiaRenderer::SwapBuffers(SwapFrameData swap_frame_data) { output_frame.latency_info = std::move(swap_frame_data.latency_info); output_frame.top_controls_visible_height_changed = swap_frame_data.top_controls_visible_height_changed; +#if BUILDFLAG(IS_EFL) + output_frame.can_skip_flush = swap_frame_data.can_skip_flush; +#endif output_frame.choreographer_vsync_id = swap_frame_data.choreographer_vsync_id; output_frame.size = viewport_size_for_swap_buffers(); output_frame.data.seq = swap_frame_data.seq; diff --git a/components/viz/service/display/surface_aggregator.cc b/components/viz/service/display/surface_aggregator.cc index d6010d6..6455212 100644 --- a/components/viz/service/display/surface_aggregator.cc +++ b/components/viz/service/display/surface_aggregator.cc @@ -430,6 +430,9 @@ struct SurfaceAggregator::PrewalkResult { base::flat_set undrawn_surfaces; bool frame_sinks_changed = false; bool page_fullscreen_mode = false; +#if BUILDFLAG(IS_EFL) + bool can_skip_flush = false; +#endif gfx::ContentColorUsage content_color_usage = gfx::ContentColorUsage::kSRGB; }; @@ -2156,6 +2159,12 @@ gfx::Rect SurfaceAggregator::PrewalkSurface(ResolvedFrameData& resolved_frame, surface->OnWillBeDrawn(); const CompositorFrame& frame = surface->GetActiveOrInterpolatedFrame(); + +#if BUILDFLAG(IS_EFL) + if (frame.metadata.can_skip_flush) + result.can_skip_flush = true; +#endif + for (const SurfaceRange& surface_range : frame.metadata.referenced_surfaces) { damage_ranges_[surface_range.end().frame_sink_id()].push_back( surface_range); @@ -2344,6 +2353,9 @@ AggregatedFrame SurfaceAggregator::Aggregate( frame.has_copy_requests = has_copy_requests_ && take_copy_requests_; frame.content_color_usage = prewalk_result.content_color_usage; frame.page_fullscreen_mode = prewalk_result.page_fullscreen_mode; +#if BUILDFLAG(IS_EFL) + frame.can_skip_flush = prewalk_result.can_skip_flush; +#endif base::ElapsedTimer copy_timer; CopyUndrawnSurfaces(&prewalk_result); diff --git a/components/viz/service/display_embedder/skia_output_device_offscreen.cc b/components/viz/service/display_embedder/skia_output_device_offscreen.cc index 55a5d15..1ff8a2c 100644 --- a/components/viz/service/display_embedder/skia_output_device_offscreen.cc +++ b/components/viz/service/display_embedder/skia_output_device_offscreen.cc @@ -82,8 +82,8 @@ void SkiaOutputDeviceOffscreen::Present( DCHECK(backend_texture_.isValid() || graphite_texture_.isValid()); StartSwapBuffers(std::move(feedback)); -#if BUILDFLAG(IS_TIZEN) - if (IsMobileProfile()) { +#if BUILDFLAG(IS_EFL) + if (!frame.can_skip_flush) { gr_context_->flushAndSubmit(GrSyncCpu::kYes); } #endif diff --git a/services/viz/public/cpp/compositing/compositor_frame_metadata_mojom_traits.cc b/services/viz/public/cpp/compositing/compositor_frame_metadata_mojom_traits.cc index 2a11811..5734956 100644 --- a/services/viz/public/cpp/compositing/compositor_frame_metadata_mojom_traits.cc +++ b/services/viz/public/cpp/compositing/compositor_frame_metadata_mojom_traits.cc @@ -47,6 +47,9 @@ bool StructTraitsmay_contain_video = data.may_contain_video(); +#if BUILDFLAG(IS_EFL) + out->can_skip_flush = data.can_skip_flush(); +#endif out->may_throttle_if_undrawn_frames = data.may_throttle_if_undrawn_frames(); out->has_shared_element_resources = data.has_shared_element_resources(); out->is_resourceless_software_draw_with_scroll_or_animation = diff --git a/services/viz/public/cpp/compositing/compositor_frame_metadata_mojom_traits.h b/services/viz/public/cpp/compositing/compositor_frame_metadata_mojom_traits.h index 5f0862f..db802e3 100644 --- a/services/viz/public/cpp/compositing/compositor_frame_metadata_mojom_traits.h +++ b/services/viz/public/cpp/compositing/compositor_frame_metadata_mojom_traits.h @@ -56,6 +56,12 @@ struct StructTraits Date: Mon, 11 Mar 2024 12:59:31 +0530 Subject: [PATCH 07/16] Support gcc build for aarch64. This commit provides fixes to aarch64 arm build to support gcc build. Change-Id: I2d51c36a4de12cebf831e76afdcc3134f57cdfb7 Signed-off-by: venu.musham --- third_party/crashpad/crashpad/util/linux/pac_helper.cc | 4 ++++ third_party/libvpx/BUILD.gn | 2 +- third_party/libvpx/source/libvpx/vpx_ports/arm.h | 7 +++++++ v8/src/trap-handler/trap-handler.h | 3 ++- 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/third_party/crashpad/crashpad/util/linux/pac_helper.cc b/third_party/crashpad/crashpad/util/linux/pac_helper.cc index a9d5f04..eb2c6c8 100644 --- a/third_party/crashpad/crashpad/util/linux/pac_helper.cc +++ b/third_party/crashpad/crashpad/util/linux/pac_helper.cc @@ -32,10 +32,14 @@ VMAddress StripPACBits(VMAddress address) { #if CRASHPAD_HAS_FEATURE(ptrauth_intrinsics) address = ptrauth_strip(address, ptrauth_key_function_pointer); #elif defined(ARCH_CPU_ARM64) +#if !defined(__GNUC__) || defined(__clang__) // Strip any pointer authentication bits that are assigned to the address. register uintptr_t x30 __asm("x30") = address; asm("xpaclri" : "+r"(x30)); address = x30; +#else + return address; +#endif #endif return address; } diff --git a/third_party/libvpx/BUILD.gn b/third_party/libvpx/BUILD.gn index edddde4..4f755a4 100644 --- a/third_party/libvpx/BUILD.gn +++ b/third_party/libvpx/BUILD.gn @@ -505,7 +505,7 @@ static_library("libvpx") { cpu_arch_full == "arm-neon-cpu-detect" || current_cpu == "arm64") { deps += [ ":libvpx_intrinsics_neon" ] } - if (current_cpu == "arm64") { + if (current_cpu == "arm64" && is_clang) { deps += [ ":libvpx_intrinsics_neon_dotprod" ] deps += [ ":libvpx_intrinsics_neon_i8mm" ] } diff --git a/third_party/libvpx/source/libvpx/vpx_ports/arm.h b/third_party/libvpx/source/libvpx/vpx_ports/arm.h index 65909d8..d5625d9 100644 --- a/third_party/libvpx/source/libvpx/vpx_ports/arm.h +++ b/third_party/libvpx/source/libvpx/vpx_ports/arm.h @@ -19,10 +19,17 @@ extern "C" { // Armv7-A optional Neon instructions, mandatory from Armv8.0-A. #define HAS_NEON (1 << 0) + +#if !defined(__GNUC__) || defined(__clang__) // Armv8.2-A optional Neon dot-product instructions, mandatory from Armv8.4-A. #define HAS_NEON_DOTPROD (1 << 1) // Armv8.2-A optional Neon i8mm instructions, mandatory from Armv8.6-A. #define HAS_NEON_I8MM (1 << 2) +#else +// gcc compilers have issues with dotprod & i8mm +#define HAS_NEON_DOTPROD 0 +#define HAS_NEON_I8MM 0 +#endif int arm_cpu_caps(void); diff --git a/v8/src/trap-handler/trap-handler.h b/v8/src/trap-handler/trap-handler.h index 289a755..6a2f00c 100644 --- a/v8/src/trap-handler/trap-handler.h +++ b/v8/src/trap-handler/trap-handler.h @@ -24,7 +24,8 @@ namespace trap_handler { #define V8_TRAP_HANDLER_SUPPORTED true // Arm64 (non-simulator) on Mac and Linux. #elif V8_TARGET_ARCH_ARM64 && V8_HOST_ARCH_ARM64 && \ - (V8_OS_DARWIN || (V8_OS_LINUX && !V8_OS_ANDROID)) + (V8_OS_DARWIN || (V8_OS_LINUX && !V8_OS_ANDROID)) && \ + defined(__clang__) #define V8_TRAP_HANDLER_SUPPORTED true // Arm64 simulator on x64 on Linux, Mac, or Windows. // -- 2.7.4 From b022898dff18caabe1fcc351c8b0c059924f71d3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Aleksander=20=C5=9Awiniarski?= Date: Mon, 11 Mar 2024 15:30:56 +0100 Subject: [PATCH 08/16] Fix problem with missing target.txt for x86_64 build MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Commit fixes patch apparent in the x86_64 build. In style_format.py we are trying to obtain the target from the target.txt. For the x86_64 target.txt it is not created to use statically linked nodejs. Now in the style_format.py we will assume default target as tizen. If we will found the target.txt file, then we will read the target from it. Change-Id: I48a99c3368e71b0c35f0846cb0f74ad2a11fee67 Signed-off-by: Aleksander Świniarski --- .../blink/renderer/bindings/scripts/bind_gen/style_format.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py b/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py index a6ef517..887a713 100644 --- a/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py +++ b/third_party/blink/renderer/bindings/scripts/bind_gen/style_format.py @@ -51,8 +51,11 @@ def init(root_src_dir, enable_style_format=True): "gn{}".format(exe_suffix)) # //tizen_src/buildtools for tizen platform - target = open(root_src_dir + "/target.txt", 'r') - target_type = target.read().strip() + target_type = 'tizen' + if os.path.exists(root_src_dir + "/target.txt"): + target = open(root_src_dir + "/target.txt", 'r') + target_type = target.read().strip() + if (target_type == "tizen"): host_arch = open(root_src_dir + "/host_arch.txt", 'r') host_arch_type = host_arch.read().strip() -- 2.7.4 From 56ab1b4792d04dee79d6555be3bf84c64c848635 Mon Sep 17 00:00:00 2001 From: Chandan Padhi Date: Mon, 11 Mar 2024 15:47:21 +0530 Subject: [PATCH 09/16] fixup! Support gcc build for chromium-efl. This commit fixes desktop build error. Change-Id: Id0bf427503103b0a1bba73186ee00aa0aee130f6 Signed-off-by: Chandan Padhi --- components/autofill/core/browser/webdata/autofill_table.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/components/autofill/core/browser/webdata/autofill_table.cc b/components/autofill/core/browser/webdata/autofill_table.cc index 44bd71b..e7c30b9 100644 --- a/components/autofill/core/browser/webdata/autofill_table.cc +++ b/components/autofill/core/browser/webdata/autofill_table.cc @@ -1744,15 +1744,18 @@ std::unique_ptr AutofillTable::GetAutofillProfile( int status; // Serialized observations for the stored type. std::vector serialized_data; - - FieldTypeData(autofill::ServerFieldType& type, - std::__cxx11::basic_string value, int status, - std::vector serialized_data) { + +#if !defined(__clang__) + FieldTypeData(autofill::ServerFieldType& type, + std::__cxx11::basic_string value, + int status, + std::vector serialized_data) { type = type; value = value; status = status; serialized_data = serialized_data; } +#endif }; std::vector field_type_values; -- 2.7.4 From eb726a66d25f6dc35b43f22e22ab586769251c5e Mon Sep 17 00:00:00 2001 From: "zhishun.zhou" Date: Fri, 8 Mar 2024 15:37:34 +0800 Subject: [PATCH 10/16] [M120 Migration][HBBTV][MM] Support Preloading feature Add preload feature for Ligada ADINS tcs. Which need high performance during video switch. Patch from: https://review.tizen.org/gerrit/#/c/292683/ Change-Id: I7c64ff3b89be4b349f343a33f1fdf414f853e4d6 Signed-off-by: xiaofang Signed-off-by: zhishun.zhou --- .../media/filters/media_player_bridge_capi.h | 23 ++- .../media/filters/media_player_bridge_capi_tv.cc | 188 ++++++++++++++++++++- .../media/filters/media_player_bridge_capi_tv.h | 14 +- 3 files changed, 215 insertions(+), 10 deletions(-) diff --git a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi.h b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi.h index 4085727..efd6250 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi.h +++ b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi.h @@ -26,6 +26,13 @@ typedef struct media_packet_s* media_packet_h; +enum PlayerState { + PLAYER_STATE_DELAYED_NULL, + PLAYER_STATE_DELAYED_PLAY, + PLAYER_STATE_DELAYED_PAUSE, + PLAYER_STATE_DELAYED_SEEK, +}; + namespace media { class MediaPlayerTizenClient; @@ -145,6 +152,14 @@ class MEDIA_EXPORT MediaPlayerBridgeCapi : public MediaPlayerTizen { scoped_refptr task_runner_; base::TimeDelta pending_seek_duration_{base::TimeDelta()}; + MediaTypeFlags media_type_{MediaType::Invalid}; + int width_{0}; + int height_{0}; + + base::TimeDelta duration_{base::TimeDelta()}; + bool is_preparing_{false}; + bool is_play_pending_{false}; + bool suspended_{false}; private: // |duration_update_timer_| related @@ -171,13 +186,8 @@ class MEDIA_EXPORT MediaPlayerBridgeCapi : public MediaPlayerTizen { bool is_file_url_{false}; bool is_paused_{false}; bool is_seeking_{false}; - bool is_play_pending_{false}; bool is_set_playback_rate_delayed_{false}; - bool suspended_{false}; - bool is_preparing_{false}; - int width_{0}; - int height_{0}; double playback_rate_{1.0}; double volume_{0.0}; @@ -185,12 +195,9 @@ class MEDIA_EXPORT MediaPlayerBridgeCapi : public MediaPlayerTizen { base::RepeatingTimer current_time_update_timer_; base::RepeatingTimer buffering_update_timer_; std::string user_agent_; - base::TimeDelta duration_{base::TimeDelta()}; base::TimeDelta playback_time_{base::TimeDelta()}; base::TimeDelta seek_duration_{base::TimeDelta()}; - MediaTypeFlags media_type_{MediaType::Invalid}; - #if defined(TIZEN_VIDEO_HOLE) bool is_video_hole_{false}; gfx::Rect delayed_viewport_rect_; diff --git a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.cc b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.cc index 5f6a944..c9ece2c 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.cc +++ b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.cc @@ -12,6 +12,16 @@ namespace { const int kSeekableTimeUpdateInterval = 500; } +static void PlayerPreLoadingCb(void* data) { + if (!data) { + LOG(ERROR) << "input data is null"; + return; + } + media::MediaPlayerBridgeCapiTV* player = + static_cast(data); + player->OnPlayerPreloading(); +} + static void DrmErrorCb(int err_code, char* err_str, void* data) { DCHECK(data); media::MediaPlayerBridgeCapiTV* player = @@ -86,12 +96,15 @@ void MediaPlayerBridgeCapiTV::Prepare() { if (blink::IsHbbTV() && CheckHighBitRate() && stream_type_ == DASH_STREAM) AppendUrlHighBitRate(url_.spec()); + player_prepared_ = false; MediaPlayerBridgeCapi::Prepare(); if (GetMediaPlayerClient()) GetMediaPlayerClient()->NotifyPlaybackState(kPlaybackReady, player_id_); } void MediaPlayerBridgeCapiTV::Release() { + is_preloaded_ = false; + player_prepared_ = false; StopSeekableTimeUpdateTimer(); MediaPlayerBridgeCapi::Release(); if (GetMediaPlayerClient()) @@ -99,6 +112,16 @@ void MediaPlayerBridgeCapiTV::Release() { } bool MediaPlayerBridgeCapiTV::Play() { + LOG(INFO) << "(" << static_cast(this) << ") " << __func__ + << ",current_time:" << GetCurrentTime().InSecondsF(); + + // HBBTV run in preloading and preplay mode. If no prepread do prepare + // in PlayerPrePlay(), otherwise do normal Play. + if (blink::IsHbbTV() && !player_prepared_) { + if (!PlayerPrePlay()) + LOG(ERROR) << "HBBTV prePlay fail."; + return false; + } if (!MediaPlayerBridgeCapi::Play()) return false; if (GetMediaPlayerClient()) @@ -106,6 +129,16 @@ bool MediaPlayerBridgeCapiTV::Play() { return true; } +void MediaPlayerBridgeCapiTV::Pause(bool is_media_related_action) { + if (!player_prepared_) { + LOG(INFO) << "(" << static_cast(this) + << "), pause while player is not prepared, pause delay"; + delayed_player_state_ = PLAYER_STATE_DELAYED_PAUSE; + return; + } + MediaPlayerBridgeCapi::Pause(is_media_related_action); +} + void MediaPlayerBridgeCapiTV::PlaybackCompleteUpdate() { MediaPlayerBridgeCapi::PlaybackCompleteUpdate(); if (GetMediaPlayerClient()) @@ -113,10 +146,16 @@ void MediaPlayerBridgeCapiTV::PlaybackCompleteUpdate() { } // namespace media void MediaPlayerBridgeCapiTV::PlayerPrepared() { + player_prepared_ = true; MediaPlayerBridgeCapi::PlayerPrepared(); + int canSeek = 0; + int retVal = player_seek_available(player_, &canSeek); + if (retVal == PLAYER_ERROR_NONE && !canSeek) + is_player_seek_available_ = false; + GetAdaptiveStreamingInfo(); - if (/*!blink::IsHbbTV() && */is_live_stream_) { + if (!blink::IsHbbTV() && is_live_stream_) { UpdateSeekableTime(); StartSeekableTimeUpdateTimer(); } @@ -282,6 +321,153 @@ void MediaPlayerBridgeCapiTV::HandleDownloadableFontInfo( type); } +bool MediaPlayerBridgeCapiTV::PreloadIfNeeded(int& ret) { + LOG(INFO) << "PreloadIfNeeded, is_preloaded_ " << is_preloaded_; + if (blink::IsHbbTV() && !is_preloaded_) { + ret = player_preloading_async(player_, -1, PlayerPreLoadingCb, this); + return true; + } + + // fixup : kPlaybackReady status need checked by HBBTVResourceAcquired() patch + if (GetMediaPlayerClient()) + GetMediaPlayerClient()->NotifyPlaybackState(kPlaybackReady, player_id_); + else + LOG(ERROR) << "(" << static_cast(this) + << "), GetMediaPlayerClient return null"; + SetDisplayAtPausedState(); + return false; +} + +void MediaPlayerBridgeCapiTV::SetDisplayAtPausedState() { + int ret = PLAYER_ERROR_NONE; + if (!pending_seek_duration_.is_zero()) + ret = player_display_video_at_paused_state(player_, false); + else + ret = player_display_video_at_paused_state(player_, true); + + if (ret != PLAYER_ERROR_NONE) + LOG(ERROR) << "player_display_video_at_paused_state() failed"; +} + +void MediaPlayerBridgeCapiTV::UpdateDuration() { + LOG(INFO) << "(" << static_cast(this) << ") " << __func__; + if (blink::IsHbbTV() && !is_preloaded_) { + LOG(INFO) << "HBBTV preload not finished, no need update duration. "; + return; + } + MediaPlayerBridgeCapi::UpdateDuration(); +} + +void MediaPlayerBridgeCapiTV::UpdateMediaType() { + LOG(INFO) << "(" << static_cast(this) << ") " << __func__; + + if (blink::IsHbbTV() && !is_preloaded_) { + LOG(INFO) << "HBBTV preload not finished, no need update media type. "; + return; + } + MediaPlayerBridgeCapi::UpdateMediaType(); +} + +bool MediaPlayerBridgeCapiTV::CheckLiveStreaming() const { + int isLive = 0; + int retVal = player_get_adaptive_streaming_info(player_, &isLive, + PLAYER_ADAPTIVE_INFO_IS_LIVE); + if (retVal != PLAYER_ERROR_NONE) { + LOG(ERROR) << "player_get_adaptive_streaming_info failed, error: " + << retVal; + return false; + } + + if (!isLive) + return false; + + LOG(INFO) << "This is a live streaming."; + return true; +} + +void MediaPlayerBridgeCapiTV::OnPlayerPreloading() { + task_runner_->PostTask( + FROM_HERE, base::BindOnce(&MediaPlayerBridgeCapiTV::PlayerPreloaded, + weak_factory_.GetWeakPtr())); +} + +bool MediaPlayerBridgeCapiTV::HBBTVResourceAcquired() { + bool media_resource_acquired = false; + if (!GetMediaPlayerClient()) { + LOG(ERROR) << "MediaPlayerTizenClient is nullptr"; + return false; + } + + GetMediaPlayerClient()->NotifyPlaybackState( + kPlaybackReady, player_id_, url_.spec(), mime_type_, + &media_resource_acquired, NULL, NULL); + if (!media_resource_acquired) { + GetMediaPlayerClient()->NotifyPlaybackState(kPlaybackStop, player_id_); + LOG(ERROR) << "HBBTV media resource acquired failed"; + } + return media_resource_acquired; +} + +void MediaPlayerBridgeCapiTV::PlayerPreloaded() { + LOG(INFO) << "PlayerPreloaded,this: " << this + << ",player_prepared_:" << player_prepared_; + + is_preloaded_ = true; + is_live_stream_ = CheckLiveStreaming(); + // if (stream_type_ == DASH_STREAM) + // ParseDashInfo(); + if (is_live_stream_ && stream_type_ != OTHER_STREAM) { + // UpdateSeekableTime(); + // StartSeekableTimeUpdateTimer(); + } + // UpdateAudioTrackInfo(); + // UpdateVideoTrackInfo(); + // UpdateTextTrackInfo(); + UpdateDuration(); + UpdateMediaType(); + if (GetMediaType() == MediaType::Invalid) { + LOG(ERROR) << "Media type is not valid!"; + return; + } + + OnReadyStateChange(player_id_, + blink::WebMediaPlayer::kReadyStateHaveFutureData); + OnNetworkStateChange(player_id_, blink::WebMediaPlayer::kNetworkStateLoading); + + if (!player_prepared_ && HBBTVResourceAcquired()) { + int ret = SetPlayerPrepareAsync(); + if (ret != PLAYER_ERROR_NONE) { + OnHandlePlayerError(ret, FROM_HERE); + } + } +} + +bool MediaPlayerBridgeCapiTV::PlayerPrePlay() { + LOG(INFO) << "PlayerPrePlay, this: " << this + << ",is_player_prepared : " << player_prepared_; + if (IsPlayerSuspended()) { + LOG(INFO) << "PlayerPrePlay while player is suspended"; + return false; + } + + if (!HBBTVResourceAcquired()) { + LOG(INFO) + << "PlayerPrePlay while it's not in case of HBBTV Resource Acquired"; + return false; + } + + delayed_player_state_ = PLAYER_STATE_DELAYED_PLAY; + LOG(INFO) << "begin to |player_prepare_async|"; + + SetDisplayAtPausedState(); + int ret = SetPlayerPrepareAsync(); + if (ret != PLAYER_ERROR_NONE) { + OnHandlePlayerError(ret, FROM_HERE); + return false; + } + + return true; +} void MediaPlayerBridgeCapiTV::Initialize(VideoRendererSink* sink) { player_set_drm_error_cb(player_, DrmErrorCb, this); MediaPlayerBridgeCapi::Initialize(sink); diff --git a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.h b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.h index ecebe7d..5cbab59 100644 --- a/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.h +++ b/tizen_src/chromium_impl/media/filters/media_player_bridge_capi_tv.h @@ -29,14 +29,20 @@ class MEDIA_EXPORT MediaPlayerBridgeCapiTV : public MediaPlayerBridgeCapi { bool Play() override; void Prepare() override; void Release() override; + void Pause(bool is_media_related_action) override; void SetContentMimeType(const std::string& mime_type) override; void PlaybackCompleteUpdate() override; + bool PreloadIfNeeded(int& ret) override; + void UpdateMediaType() override; + void UpdateDuration() override; + void AppendUrlHighBitRate(const std::string& url); bool CheckHighBitRate(); void HandleDownloadableFontInfo(const std::string& scheme_id_uri, const std::string& value, const std::string& data, int type); + void OnPlayerPreloading(); void OnDrmError(int err_code, char* err_str); @@ -44,8 +50,15 @@ class MEDIA_EXPORT MediaPlayerBridgeCapiTV : public MediaPlayerBridgeCapi { void PlayerPrepared() override; private: + void PlayerPreloaded(); + bool PlayerPrePlay(); + void SetDisplayAtPausedState(); + bool CheckLiveStreaming() const; + bool HBBTVResourceAcquired(); bool SetDrmInfo(std::string& drm_info); bool SetMediaDRMInfo(const std::string&, const std::string&); + bool is_preloaded_{false}; + bool is_player_seek_available_{true}; void StartSeekableTimeUpdateTimer(); void StopSeekableTimeUpdateTimer(); void OnSeekableTimeUpdateTimerFired(); @@ -61,7 +74,6 @@ class MEDIA_EXPORT MediaPlayerBridgeCapiTV : public MediaPlayerBridgeCapi { base::TimeDelta min_seekable_time_{base::TimeDelta()}; base::TimeDelta max_seekable_time_{base::TimeDelta()}; base::RepeatingTimer seekable_time_update_timer_; - // NOTE: Weak pointers must be invalidated before all other member variables. base::WeakPtrFactory weak_factory_; }; -- 2.7.4 From fb4f6af991c4fa8cc044b3af4cfedecebcfd4ff2 Mon Sep 17 00:00:00 2001 From: fangfengrong Date: Fri, 8 Mar 2024 11:46:16 +0800 Subject: [PATCH 11/16] [M120 Migration]Fix IMContextEfl crash issue during app exit During App exit, the RWHVAuraCommonHelperEfl destruction before the IMContextEfl, after RWHVAuraCommonHelperEfl destruction, the rwh_helper_ of IMContextEfl been a wild pointers, once IMContextEfl use the rwh_helper_ wild pointers, it will cause crash. On RWHVAuraCommonHelperEfl destruction, set the rwh_helper_ of IMContextEfl to null to avoid crash. refer: https://review.tizen.org/gerrit/#/c/295867 Change-Id: Ife433c18d98ff0d4b39f310fafed89d03ee410ab Signed-off-by: fangfengrong --- .../content/browser/renderer_host/rwhv_aura_common_helper_efl.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_common_helper_efl.cc b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_common_helper_efl.cc index 84bf010..36f208c 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_common_helper_efl.cc +++ b/tizen_src/chromium_impl/content/browser/renderer_host/rwhv_aura_common_helper_efl.cc @@ -167,7 +167,11 @@ RWHVAuraCommonHelperEfl::RWHVAuraCommonHelperEfl( display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor(); } -RWHVAuraCommonHelperEfl::~RWHVAuraCommonHelperEfl() = default; +RWHVAuraCommonHelperEfl::~RWHVAuraCommonHelperEfl() { + if (im_context_efl_) + im_context_efl_->SetRWHHelper(nullptr); + rwh_helper_.reset(); +} void RWHVAuraCommonHelperEfl::DidChangeInputType(bool is_password_field) { web_contents_->GetDelegate()->DidChangeInputType(is_password_field); -- 2.7.4 From c5b7bd7832675547d1cf03ab8d38f596e56160a6 Mon Sep 17 00:00:00 2001 From: zhaodan Date: Fri, 8 Mar 2024 15:17:45 +0800 Subject: [PATCH 12/16] [M120 Migration][HBBTV] Forcing v8 context initialization if no