Skip to content

Update evasgl sync logic #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions shell/platform/tizen/tizen_renderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ bool TizenRenderer::OnMakeCurrent() {
if (evas_gl_make_current(evas_gl_, gl_surface_, gl_context_) != EINA_TRUE) {
return false;
}
evas_object_image_pixels_dirty_set((Evas_Object*)GetImageHandle(), EINA_TRUE);
return true;
}

Expand Down Expand Up @@ -517,6 +516,7 @@ bool TizenRenderer::OnPresent() {
SendRotationChangeDone();
received_rotation = false;
}
evas_object_image_pixels_dirty_set((Evas_Object*)GetImageHandle(), EINA_TRUE);
return true;
}

Expand Down Expand Up @@ -662,6 +662,8 @@ bool TizenRenderer::InitializeRenderer(int32_t x, int32_t y, int32_t w,

bool TizenRenderer::IsValid() { return is_valid_; }

void TizenRenderer::flush() { glFlush(); }

bool TizenRenderer::SetupEvasGL(int32_t x, int32_t y, int32_t w, int32_t h) {
evas_gl_ = evas_gl_new(
evas_object_evas_get((Evas_Object*)SetupEvasWindow(x, y, w, h)));
Expand Down Expand Up @@ -697,9 +699,12 @@ bool TizenRenderer::SetupEvasGL(int32_t x, int32_t y, int32_t w, int32_t h) {
Evas_Native_Surface ns;
evas_gl_native_surface_get(evas_gl_, gl_surface_, &ns);
evas_object_image_native_surface_set((Evas_Object*)GetImageHandle(), &ns);
pixelDirtyCallback_ = [](void* data, Evas_Object* o) {};
pixelDirtyCallback_ = [](void* data, Evas_Object* o) {
TizenRenderer* renderer = (TizenRenderer*)data;
renderer->flush();
};
evas_object_image_pixels_get_callback_set((Evas_Object*)GetImageHandle(),
pixelDirtyCallback_, NULL);
pixelDirtyCallback_, this);
return true;
}

Expand All @@ -719,4 +724,4 @@ void TizenRenderer::DestoryEvasGL() {
evas_gl_free(evas_gl_);
}

#endif
#endif
1 change: 1 addition & 0 deletions shell/platform/tizen/tizen_renderer.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ class TizenRenderer {
bool OnPresent();
uint32_t OnGetFBO();
void* OnProcResolver(const char* name);
void flush();
virtual TizenWindowGeometry GetGeometry() = 0;
bool IsValid();
virtual void Show() = 0;
Expand Down