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

Unified Diff: trunk/src/cc/layers/nine_patch_layer_impl.h

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/layers/nine_patch_layer.cc ('k') | trunk/src/cc/layers/nine_patch_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/cc/layers/nine_patch_layer_impl.h
===================================================================
--- trunk/src/cc/layers/nine_patch_layer_impl.h (revision 223178)
+++ trunk/src/cc/layers/nine_patch_layer_impl.h (working copy)
@@ -10,7 +10,6 @@
#include "cc/base/cc_export.h"
#include "cc/layers/layer_impl.h"
#include "cc/resources/resource_provider.h"
-#include "cc/resources/ui_resource_client.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
@@ -28,38 +27,9 @@
}
virtual ~NinePatchLayerImpl();
+ void SetResourceId(unsigned id) { resource_id_ = id; }
+ void SetLayout(gfx::Size image_bounds, gfx::Rect aperture);
- void SetUIResourceId(UIResourceId uid);
-
- // The bitmap stretches out the bounds of the layer. The following picture
- // illustrates the parameters associated with the dimensions.
- //
- // Layer space layout Bitmap space layout
- //
- // ------------------------ ~~~~~~~~~~ W ~~~~~~~~~~
- // | : | : : |
- // | C | : Y |
- // | : | : : |
- // | ------------ | :~~X~~------------ |
- // | | | | : | : |
- // | | | | : | : |
- // |~~A~~| |~~B~~| H | Q |
- // | | | | : | : |
- // | ------------ | : ~~~~~P~~~~~ |
- // | : | : |
- // | D | : |
- // | : | : |
- // ------------------------ ------------------------
- //
- // |image_bounds| = (W, H)
- // |image_aperture| = (X, Y, P, Q)
- // |border| = (A, C, A + B, C + D)
- // |fill_center| indicates whether to draw the center quad or not.
- void SetLayout(gfx::Size image_bounds,
- gfx::Rect image_aperture,
- gfx::Rect border,
- bool fill_center);
-
virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
OVERRIDE;
virtual void PushPropertiesTo(LayerImpl* layer) OVERRIDE;
@@ -69,6 +39,7 @@
virtual void AppendQuads(QuadSink* quad_sink,
AppendQuadsData* append_quads_data) OVERRIDE;
virtual ResourceProvider::ResourceId ContentsResourceId() const OVERRIDE;
+ virtual void DidLoseOutputSurface() OVERRIDE;
virtual base::DictionaryValue* LayerTreeAsJson() const OVERRIDE;
@@ -85,13 +56,8 @@
// image space.
gfx::Rect image_aperture_;
- // An inset border that the patches will be mapped to.
- gfx::Rect border_;
+ ResourceProvider::ResourceId resource_id_;
- bool fill_center_;
-
- UIResourceId ui_resource_id_;
-
DISALLOW_COPY_AND_ASSIGN(NinePatchLayerImpl);
};
« no previous file with comments | « trunk/src/cc/layers/nine_patch_layer.cc ('k') | trunk/src/cc/layers/nine_patch_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698