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

Side by Side Diff: cc/nine_patch_layer.h

Issue 11472021: cc: Pass LayerTreeHostImpl to LayerImpl constructor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years 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
« no previous file with comments | « cc/layer_unittest.cc ('k') | cc/nine_patch_layer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #ifndef CC_NINE_PATCH_LAYER_H_ 5 #ifndef CC_NINE_PATCH_LAYER_H_
6 #define CC_NINE_PATCH_LAYER_H_ 6 #define CC_NINE_PATCH_LAYER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/cc_export.h" 9 #include "cc/cc_export.h"
10 #include "cc/layer.h" 10 #include "cc/layer.h"
(...skipping 18 matching lines...) Expand all
29 // the center patch of the ninepatch (which is unused in this 29 // the center patch of the ninepatch (which is unused in this
30 // implementation). We split off eight rects surrounding it and stick them 30 // implementation). We split off eight rects surrounding it and stick them
31 // on the edges of the layer. The corners are unscaled, the top and bottom 31 // on the edges of the layer. The corners are unscaled, the top and bottom
32 // rects are x-stretched to fit, and the left and right rects are 32 // rects are x-stretched to fit, and the left and right rects are
33 // y-stretched to fit. 33 // y-stretched to fit.
34 void setBitmap(const SkBitmap& bitmap, const gfx::Rect& aperture); 34 void setBitmap(const SkBitmap& bitmap, const gfx::Rect& aperture);
35 35
36 private: 36 private:
37 NinePatchLayer(); 37 NinePatchLayer();
38 virtual ~NinePatchLayer(); 38 virtual ~NinePatchLayer();
39 virtual scoped_ptr<LayerImpl> createLayerImpl() OVERRIDE; 39 virtual scoped_ptr<LayerImpl> createLayerImpl(LayerTreeHostImpl* hostImpl) O VERRIDE;
40 40
41 void createUpdaterIfNeeded(); 41 void createUpdaterIfNeeded();
42 void createResource(); 42 void createResource();
43 43
44 scoped_refptr<ImageLayerUpdater> m_updater; 44 scoped_refptr<ImageLayerUpdater> m_updater;
45 scoped_ptr<LayerUpdater::Resource> m_resource; 45 scoped_ptr<LayerUpdater::Resource> m_resource;
46 46
47 SkBitmap m_bitmap; 47 SkBitmap m_bitmap;
48 bool m_bitmapDirty; 48 bool m_bitmapDirty;
49 49
50 // The transparent center region that shows the parent layer's contents in i mage space. 50 // The transparent center region that shows the parent layer's contents in i mage space.
51 gfx::Rect m_imageAperture; 51 gfx::Rect m_imageAperture;
52 }; 52 };
53 53
54 } // namespace cc 54 } // namespace cc
55 55
56 #endif // CC_NINE_PATCH_LAYER_H_ 56 #endif // CC_NINE_PATCH_LAYER_H_
OLDNEW
« no previous file with comments | « cc/layer_unittest.cc ('k') | cc/nine_patch_layer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698