Page rotation look weird
authorGrzegorz Spryszynski <g.spryszynsk@samsung.com>
Tue, 28 Apr 2015 08:16:22 +0000 (10:16 +0200)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
[Problem] In landscape mode pages looks inproper
(rotation and scale are invalid).
[Solution] Old rotation mechanism require matrixes
describing texture transformations. Now it is enougth
to use one matrix regardles of rotation.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=12721

Signed-off-by: Grzegorz Spryszynski <g.spryszynsk@samsung.com>
Change-Id: Ib8dd3472ed0b322d79308a9a96744354d566810a

tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc
tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.h

index 12ca47e..0a8ff62 100644 (file)
@@ -332,30 +332,6 @@ void RenderWidgetHostViewEfl::initializeProgram() {
                                       sizeof(vertex_attributes),
                                       vertex_attributes, GL_STATIC_DRAW));
 
-  const GLfloat vertex_attributes_270[] = {
-      -1.0f, -1.0f, 0.0f, 1.0f, 0.0f,
-      -1.0f,  1.0f, 0.0f, 0.0f, 0.0f,
-       1.0f,  1.0f, 0.0f, 0.0f, 1.0f,
-       1.0f, -1.0f, 0.0f, 1.0f, 1.0f};
-
-  GL_CHECK(evas_gl_api_->glGenBuffers(1, &vertex_buffer_obj_270_));
-  GL_CHECK(evas_gl_api_->glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_obj_270_));
-  GL_CHECK(evas_gl_api_->glBufferData(GL_ARRAY_BUFFER,
-                                      sizeof(vertex_attributes_270),
-                                      vertex_attributes_270, GL_STATIC_DRAW));
-
-  const GLfloat vertex_attributes_90[] = {
-      -1.0f, -1.0f, 0.0f, 0.0f, 1.0f,
-      -1.0f,  1.0f, 0.0f, 1.0f, 1.0f,
-       1.0f,  1.0f, 0.0f, 1.0f, 0.0f,
-       1.0f, -1.0f, 0.0f, 0.0f, 0.0f};
-
-  GL_CHECK(evas_gl_api_->glGenBuffers(1, &vertex_buffer_obj_90_));
-  GL_CHECK(evas_gl_api_->glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_obj_90_));
-  GL_CHECK(evas_gl_api_->glBufferData(GL_ARRAY_BUFFER,
-                                      sizeof(vertex_attributes_90),
-                                      vertex_attributes_90, GL_STATIC_DRAW));
-
   const GLushort index_attributes[] = {0, 1, 2, 0, 2, 3};
   GL_CHECK(evas_gl_api_->glGenBuffers(1, &index_buffer_obj_));
   GL_CHECK(
@@ -398,16 +374,7 @@ void RenderWidgetHostViewEfl::PaintTextureToSurface(GLuint texture_id) {
 
   current_orientation_ = ecore_evas_rotation_get(ecore_evas_ecore_evas_get(evas_));
 
-  switch (current_orientation_) {
-    case 270:
-      GL_CHECK(gl_api->glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_obj_270_));
-      break;
-    case 90:
-      GL_CHECK(gl_api->glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_obj_90_));
-      break;
-    default:
-      GL_CHECK(gl_api->glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_obj_));
-  } // switch(current_orientation_)
+  GL_CHECK(gl_api->glBindBuffer(GL_ARRAY_BUFFER, vertex_buffer_obj_));
 
   GL_CHECK(gl_api->glEnableVertexAttribArray(position_attrib_));
   // Below 5 * sizeof(GLfloat) value specifies the size of a vertex
index 58ff036..045fbca 100644 (file)
@@ -308,8 +308,6 @@ class RenderWidgetHostViewEfl
   gfx::Size surface_size_;
   bool is_modifier_key_;
   GLuint vertex_buffer_obj_;
-  GLuint vertex_buffer_obj_270_;
-  GLuint vertex_buffer_obj_90_;
   GLuint index_buffer_obj_;
 
   bool touch_events_enabled_;