Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 27973002: cc: Adding ETC1 support to UIResourceBitmap and ResourceProvider (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: latest comments Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 3290 matching lines...) Expand 10 before | Expand all | Expand 10 after
3301 3301
3302 host_impl_->SetViewportSize(DipSizeToPixelSize(viewport_size_)); 3302 host_impl_->SetViewportSize(DipSizeToPixelSize(viewport_size_));
3303 SetupActiveTreeLayers(); 3303 SetupActiveTreeLayers();
3304 3304
3305 SkBitmap skbitmap; 3305 SkBitmap skbitmap;
3306 skbitmap.setConfig(SkBitmap::kARGB_8888_Config, 2, 2); 3306 skbitmap.setConfig(SkBitmap::kARGB_8888_Config, 2, 2);
3307 skbitmap.allocPixels(); 3307 skbitmap.allocPixels();
3308 skbitmap.setImmutable(); 3308 skbitmap.setImmutable();
3309 3309
3310 // Specify an overhang bitmap to use. 3310 // Specify an overhang bitmap to use.
3311 UIResourceBitmap ui_resource_bitmap(skbitmap, UIResourceBitmap::REPEAT); 3311 UIResourceBitmap ui_resource_bitmap(skbitmap);
3312 ui_resource_bitmap.SetWrapMode(UIResourceBitmap::REPEAT);
3312 UIResourceId ui_resource_id = 12345; 3313 UIResourceId ui_resource_id = 12345;
3313 host_impl_->CreateUIResource(ui_resource_id, ui_resource_bitmap); 3314 host_impl_->CreateUIResource(ui_resource_id, ui_resource_bitmap);
3314 host_impl_->SetOverhangUIResource(ui_resource_id, gfx::Size(32, 32)); 3315 host_impl_->SetOverhangUIResource(ui_resource_id, gfx::Size(32, 32));
3315 set_gutter_quad_material(DrawQuad::TEXTURE_CONTENT); 3316 set_gutter_quad_material(DrawQuad::TEXTURE_CONTENT);
3316 set_gutter_texture_size(gfx::Size(32, 32)); 3317 set_gutter_texture_size(gfx::Size(32, 32));
3317 3318
3318 TestLayerCoversFullViewport(); 3319 TestLayerCoversFullViewport();
3319 TestEmptyLayer(); 3320 TestEmptyLayer();
3320 TestLayerInMiddleOfViewport(); 3321 TestLayerInMiddleOfViewport();
3321 TestLayerIsLargerThanViewport(); 3322 TestLayerIsLargerThanViewport();
(...skipping 2145 matching lines...) Expand 10 before | Expand all | Expand 10 after
5467 // The root should have scrolled. 5468 // The root should have scrolled.
5468 ASSERT_EQ(2u, scroll_info->scrolls.size()); 5469 ASSERT_EQ(2u, scroll_info->scrolls.size());
5469 ExpectContains(*scroll_info.get(), 5470 ExpectContains(*scroll_info.get(),
5470 host_impl_->active_tree()->root_layer()->id(), 5471 host_impl_->active_tree()->root_layer()->id(),
5471 gfx::Vector2d(0, 10)); 5472 gfx::Vector2d(0, 10));
5472 } 5473 }
5473 } 5474 }
5474 5475
5475 } // namespace 5476 } // namespace
5476 } // namespace cc 5477 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.cc ('k') | content/common/gpu/client/context_provider_command_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698