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

Unified Diff: trunk/src/cc/test/layer_tree_json_parser.cc

Issue 23740010: Revert 223162 "Update the nine patch layer to use UI resources" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/cc/test/fake_scoped_ui_resource.cc ('k') | trunk/src/cc/trees/layer_tree_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/test/layer_tree_json_parser.cc
===================================================================
--- trunk/src/cc/test/layer_tree_json_parser.cc (revision 223178)
+++ trunk/src/cc/test/layer_tree_json_parser.cc (working copy)
@@ -54,29 +54,14 @@
success &= list->GetInteger(0, &image_width);
success &= list->GetInteger(1, &image_height);
- success &= dict->GetList("Border", &list);
- int border_x, border_y, border_width, border_height;
- success &= list->GetInteger(0, &border_x);
- success &= list->GetInteger(1, &border_y);
- success &= list->GetInteger(2, &border_width);
- success &= list->GetInteger(3, &border_height);
-
- bool fill_center;
- success &= dict->GetBoolean("FillCenter", &fill_center);
-
scoped_refptr<NinePatchLayer> nine_patch_layer = NinePatchLayer::Create();
SkBitmap bitmap;
bitmap.setConfig(SkBitmap::kARGB_8888_Config, image_width, image_height);
bitmap.allocPixels(NULL, NULL);
- bitmap.setImmutable();
nine_patch_layer->SetBitmap(bitmap,
gfx::Rect(aperture_x, aperture_y, aperture_width, aperture_height));
- nine_patch_layer->SetBorder(
- gfx::Rect(border_x, border_y, border_width, border_height));
- nine_patch_layer->SetFillCenter(fill_center);
-
new_layer = nine_patch_layer;
} else if (layer_type == "PictureLayer") {
new_layer = PictureLayer::Create(content_client);
« no previous file with comments | « trunk/src/cc/test/fake_scoped_ui_resource.cc ('k') | trunk/src/cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698