#include "base/android/content_uri_utils.h"
#endif
+#if BUILDFLAG(IS_TIZEN_TV)
+#include "third_party/blink/public/platform/web_application_type.h"
+#endif
+
using base::UTF16ToUTF8;
namespace content {
void NavigationEntryImpl::SetVirtualURL(const GURL& url) {
virtual_url_ = (url == GetURL()) ? GURL() : url;
cached_display_title_.clear();
+#if BUILDFLAG(IS_TIZEN_TV)
+ blink::SetURLType(url.spec());
+#endif
}
const GURL& NavigationEntryImpl::GetVirtualURL() {
#ifndef WEB_APPLICATION_TYPE_H_
#define WEB_APPLICATION_TYPE_H_
+#include <string>
+
namespace blink {
enum class ApplicationType : unsigned {
OTHER
};
+enum class URLType : unsigned { TVPLUS = 0, OTHER };
+
void SetApplicationType(const ApplicationType appType);
void SetSupportRGBA(bool use_rgba);
+void SetURLType(const std::string& url);
bool IsSupportRGBA();
bool IsWebBrowser();
bool IsHbbTV();
bool IsTIZENWRT();
+bool IsTVPlus();
} // namespace blink
evas_gl_config_->stencil_bits = EVAS_GL_STENCIL_BIT_8;
#if BUILDFLAG(IS_TIZEN_TV)
- if (!blink::IsSupportRGBA())
- evas_gl_config_->color_format = EVAS_GL_RGB_888;
+ if (blink::IsHbbTV()) {
+ if (blink::IsTVPlus()) {
+ evas_gl_config_->options_bits =
+ (Evas_GL_Options_Bits)(EVAS_GL_OPTIONS_DIRECT |
+ EVAS_GL_OPTIONS_DIRECT_MEMORY_OPTIMIZE |
+ EVAS_GL_OPTIONS_DIRECT_OVERRIDE);
+ } else {
+ evas_gl_config_->options_bits =
+ (Evas_GL_Options_Bits)(EVAS_GL_OPTIONS_NONE);
+ }
+
+ LOG(INFO) << "Disable depth/stencil bits when HBBTV";
+ evas_gl_config_->depth_bits = EVAS_GL_DEPTH_NONE;
+ evas_gl_config_->stencil_bits = EVAS_GL_STENCIL_NONE;
+ } else {
+ if (!blink::IsSupportRGBA())
+ evas_gl_config_->color_format = EVAS_GL_RGB_888;
+ }
#endif
evas_gl_ = evas_gl_new(evas_);
evas_object_geometry_set(content_image_, x, y, width, height);
evas_object_geometry_set(content_image_elm_host_, x, y, width, height);
+#if BUILDFLAG(IS_TIZEN_TV)
+ if (blink::IsTVPlus()) {
+ evas_object_render_op_set(content_image_, EVAS_RENDER_COPY);
+ }
+#endif
+
if (use_hw_backend_) {
if (evas_gl_surface_) {
evas_object_image_native_surface_set(content_image_, NULL);
namespace {
ApplicationType s_applicationType = ApplicationType::WEBBROWSER;
+URLType s_urlType = URLType::OTHER;
bool use_RGBA_mode = false;
} // namespace
s_applicationType = appType;
}
+void SetURLType(const std::string& url) {
+ // TVPlusURL check code should be synchronized with HbbTV
+ std::string tvplus_path("/home/owner/apps_rw/com.samsung.tv.tvplus");
+ if (url.find(tvplus_path) != std::string::npos)
+ s_urlType = URLType::TVPLUS;
+ else
+ s_urlType = URLType::OTHER;
+}
+
void SetSupportRGBA(bool use_rgba) {
use_RGBA_mode = use_rgba;
}
return s_applicationType == ApplicationType::HBBTV;
}
+bool IsTVPlus() {
+ if (!IsHbbTV())
+ return false;
+
+ return s_urlType == URLType::TVPLUS;
+}
+
bool IsTIZENWRT() {
return s_applicationType == ApplicationType::TIZENWRT;
}
blink::SetApplicationType(static_cast<blink::ApplicationType>(app_type));
}
+void SetURLType(const std::string& url) {
+ blink::SetURLType(url);
+}
+
void SetSupportRGBA(bool use_rgba) {
blink::SetSupportRGBA(use_rgba);
}
return blink::IsHbbTV();
}
+bool IsTVPlus() {
+ return blink::IsTVPlus();
+}
+
bool IsTIZENWRT() {
return blink::IsTIZENWRT();
}
#ifndef APPLICATION_TYPE_H_
#define APPLICATION_TYPE_H_
+#include <string>
+
namespace content {
enum class ApplicationType : unsigned {
};
void SetApplicationType(const ApplicationType app_type);
+void SetURLType(const std::string& url);
void SetSupportRGBA(bool use_rgba);
bool IsSupportRGBA();
bool IsWebBrowser();
bool IsHbbTV();
bool IsTIZENWRT();
+bool IsTVPlus();
} // namespace content
#endif // APPLICATION_TYPE_H_
return false;
elm_object_style_set(rwhva()->offscreen_helper()->content_image_elm_host(),
enabled ? "transparent" : "default");
+#if BUILDFLAG(IS_TIZEN_TV)
+ if (!IsTVPlus())
+ evas_object_image_alpha_set(rwhva()->offscreen_helper()->content_image(),
+ enabled);
+#else
evas_object_image_alpha_set(rwhva()->offscreen_helper()->content_image(),
enabled);
+#endif
GetWebContentsViewAura()->SetBackgroundColor(enabled ? SK_ColorTRANSPARENT
: SK_ColorWHITE);
static_cast<RenderViewHostImpl*>(render_view_host)
return false;
elm_object_style_set(rwhva()->offscreen_helper()->content_image_elm_host(),
alpha < 255 ? "transparent" : "default");
+#if BUILDFLAG(IS_TIZEN_TV)
+ if (!IsTVPlus())
+ evas_object_image_alpha_set(rwhva()->offscreen_helper()->content_image(),
+ alpha < 255);
+#else
evas_object_image_alpha_set(rwhva()->offscreen_helper()->content_image(),
alpha < 255);
+#endif
GetWebContentsViewAura()->SetBackgroundColor(
SkColorSetARGB(alpha, red, green, blue));
static_cast<RenderViewHostImpl*>(render_view_host)