Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / cc / trees / layer_tree_host_unittest_delegated.cc
index 7b0926f..7fe0ece 100644 (file)
@@ -135,14 +135,12 @@ class LayerTreeHostDelegatedTest : public LayerTreeTest {
                                ResourceProvider::ResourceId resource_id) {
     TransferableResource resource;
     resource.id = resource_id;
-    resource.target = GL_TEXTURE_2D;
-    GLbyte arbitrary_mailbox[64] = {
-      1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
-      1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
-      1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0,
-      1, 2, 3, 4
-    };
-    resource.mailbox.SetName(arbitrary_mailbox);
+    resource.mailbox_holder.texture_target = GL_TEXTURE_2D;
+    GLbyte arbitrary_mailbox[GL_MAILBOX_SIZE_CHROMIUM] = {
+        1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2,
+        3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4,
+        5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4};
+    resource.mailbox_holder.mailbox.SetName(arbitrary_mailbox);
     frame->resource_list.push_back(resource);
   }
 
@@ -709,13 +707,14 @@ class LayerTreeHostDelegatedTestLayerUsesFrameDamage
     first_draw_for_source_frame_ = true;
   }
 
-  virtual bool PrepareToDrawOnThread(LayerTreeHostImpl* host_impl,
-                                     LayerTreeHostImpl::FrameData* frame,
-                                     bool result) OVERRIDE {
-    EXPECT_TRUE(result);
+  virtual DrawSwapReadbackResult::DrawResult PrepareToDrawOnThread(
+      LayerTreeHostImpl* host_impl,
+      LayerTreeHostImpl::FrameData* frame,
+      DrawSwapReadbackResult::DrawResult draw_result) OVERRIDE {
+    EXPECT_EQ(DrawSwapReadbackResult::DRAW_SUCCESS, draw_result);
 
     if (!first_draw_for_source_frame_)
-      return result;
+      return draw_result;
 
     gfx::RectF damage_rect;
     if (!frame->has_no_damage) {
@@ -811,7 +810,7 @@ class LayerTreeHostDelegatedTestLayerUsesFrameDamage
         break;
     }
 
-    return result;
+    return draw_result;
   }
 
  protected: