// contributing layer that escapes clip, this will find the nearest ancestor
// that doesn't.
while (target_node->clip_id > clip_node->id ||
- property_trees->effect_tree()
- .GetRenderSurface(target_node->id)
- ->has_contributing_layer_that_escapes_clip()) {
+ (property_trees->effect_tree().GetRenderSurface(target_node->id) &&
+ property_trees->effect_tree()
+ .GetRenderSurface(target_node->id)
+ ->has_contributing_layer_that_escapes_clip())) {
target_node = effect_tree.Node(target_node->target_id);
}
#include "wrt/public/browser/wrt.h"
#endif
+#if BUILDFLAG(IS_TIZEN_TV)
+#include "ewk/efl_integration/common/application_type.h"
+#include "ui/ozone/platform/efl/efl_screen.h"
+#endif
+
+#if defined(TIZEN_TBM_SUPPORT)
+#include "ui/compositor/compositor.h"
+#endif
+
namespace content {
std::unique_ptr<WebContentsView> CreateWebContentsView(
#if BUILDFLAG(IS_TIZEN)
void WebContentsViewAura::SetOrientation(int orientation) {
LOG(INFO) << __FUNCTION__ << " " << orientation;
- NOTIMPLEMENTED();
+
+ RenderWidgetHostViewAura* rwhv_aura = static_cast<RenderWidgetHostViewAura*>(
+ web_contents_->GetRenderWidgetHostView());
+ if (rwhv_aura) {
+#if defined(TIZEN_TBM_SUPPORT)
+ if (rwhv_aura->GetCompositor() &&
+ rwhv_aura->GetCompositor()->use_tbm_surface_for_offscreen_rendering()) {
+ display::DeviceDisplayInfoEfl display_info;
+ display_info.SetRotationDegrees(orientation);
+ }
+#endif
+ }
+
+ TRACE_EVENT1("viz", "WebContentsViewAura::SetOrientation", "orientation", orientation);
+ orientation_ = orientation;
}
#endif
void* VideoPlaneController::main_window_handle_ = nullptr;
VideoPlaneController::RenderingMode VideoPlaneController::rendering_mode_ =
VideoPlaneController::RenderingMode::OFFSCREEN;
+bool VideoPlaneController::use_wayland_window = false;
VideoPlaneController::VideoPlaneController() : should_crop_video_(false) {}
}
static RenderingMode rendering_mode() { return rendering_mode_; }
+ static void set_use_wayland_window(bool use) { use_wayland_window = use; }
+
+ static bool get_use_wayland_window() { return use_wayland_window; }
+
+ static bool use_wayland_window;
+
VideoPlaneController();
virtual ~VideoPlaneController();
LOG(INFO) << __func__ << " set ESPLUSPLAYER_DISPLAY_TYPE_OVERLAY";
int player_error = ESPLUSPLAYER_ERROR_TYPE_NONE;
if (video_plane_controller_->rendering_mode() ==
- VideoPlaneController::RenderingMode::OFFSCREEN) {
+ VideoPlaneController::RenderingMode::OFFSCREEN &&
+ !video_plane_controller_->get_use_wayland_window()) {
player_error = esplusplayer_set_display(
esplayer_, ESPLUSPLAYER_DISPLAY_TYPE_OVERLAY,
video_plane_controller_->GetVideoPlaneHandle());
#if BUILDFLAG(IS_TIZEN)
static Eina_Bool RotateWindowCb(void* data, int type, void* event) {
auto wv = static_cast<EWebView*>(data);
+#if defined(TIZEN_TBM_SUPPORT)
+ if (wv->rwhva() && wv->rwhva()->GetCompositor() &&
+ wv->rwhva()->GetCompositor()->use_tbm_surface_for_offscreen_rendering()) {
+ Ecore_Wl2_Event_Window_Rotation* rotateEvent =
+ static_cast<Ecore_Wl2_Event_Window_Rotation*>(event);
+ if (rotateEvent != nullptr) {
+ LOG(INFO) << "For NUI app, new ori " << rotateEvent->angle;
+ wv->SetOrientation(rotateEvent->angle);
+ }
+ return ECORE_CALLBACK_PASS_ON;
+ }
+#endif
+ LOG(INFO) << "New ori "
+ << ecore_evas_rotation_get(
+ ecore_evas_ecore_evas_get(wv->GetEvas()));
wv->SetOrientation(
ecore_evas_rotation_get(ecore_evas_ecore_evas_get(wv->GetEvas())));
return ECORE_CALLBACK_PASS_ON;
#if defined(TIZEN_TBM_SUPPORT)
EWK_VIEW_IMPL_GET_OR_RETURN(o, impl);
impl->SetOffscreenRendering(enabled);
+#if defined(TIZEN_VIDEO_HOLE)
+ media::VideoPlaneController::set_use_wayland_window(true);
+#endif
#else
LOG_EWK_API_MOCKUP();
#endif