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

Side by Side Diff: cc/DecorationLayerChromium.h

Issue 10963056: [cc] Add window decoration layers (NinePatch) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: hacky rebase for Jerome to use Created 8 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
« no previous file with comments | « cc/CCDecorationLayerImplTest.cpp ('k') | cc/DecorationLayerChromium.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef DecorationLayerChromium_h
6 #define DecorationLayerChromium_h
7
8 #include "LayerChromium.h"
9 #include "LayerTextureUpdater.h"
10 #include "SkBitmap.h"
11
12 namespace cc {
13
14 class DecorationLayerTextureUpdater;
15
16 // A Layer that contains sparse quads being sourced from bitmaps.
17 class DecorationLayerChromium : public LayerChromium {
18 public:
19 static scoped_refptr<DecorationLayerChromium> create();
20 virtual ~DecorationLayerChromium();
21
22 virtual bool drawsContent() const OVERRIDE;
23 virtual void setTexturePriorities(const CCPriorityCalculator&) OVERRIDE;
24 virtual void update(CCTextureUpdateQueue&, const CCOcclusionTracker*, CCRend eringStats&) OVERRIDE;
25 virtual bool needsContentsScale() const OVERRIDE;
26 virtual void pushPropertiesTo(CCLayerImpl*) OVERRIDE;
27
28 void setBitmap(const SkBitmap& bitmap, const IntRect& aperture);
29
30 private:
31 DecorationLayerChromium();
32 scoped_ptr<CCLayerImpl> createCCLayerImpl() OVERRIDE;
33
34 virtual void createTextureUpdaterIfNeeded() OVERRIDE;
35
36 RefPtr<DecorationLayerTextureUpdater> m_textureUpdater;
37 OwnPtr<LayerTextureUpdater::Texture> m_texture;
38
39 SkBitmap m_bitmap;
40 bool m_bitmapDirty;
41
42 // The transparent center region that shows the parent layer's contents in i mage space.
43 IntRect m_imageAperture;
44 };
45
46 }
47
48 #endif
OLDNEW
« no previous file with comments | « cc/CCDecorationLayerImplTest.cpp ('k') | cc/DecorationLayerChromium.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698