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

Side by Side Diff: cc/CCDecorationLayerImpl.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 | « no previous file | cc/CCDecorationLayerImpl.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 CCDecorationLayerImpl_h
6 #define CCDecorationLayerImpl_h
7
8 #include "CCLayerImpl.h"
9 #include <public/WebTransformationMatrix.h>
10
11 namespace cc {
12
13 class CCDecorationLayerImpl : public CCLayerImpl {
14 public:
15 static scoped_ptr<CCDecorationLayerImpl> create(int id)
16 {
17 return make_scoped_ptr(new CCDecorationLayerImpl(id));
18 }
19 virtual ~CCDecorationLayerImpl();
20
21 virtual void willDraw(CCResourceProvider*) OVERRIDE;
22 virtual void appendQuads(CCQuadSink&, CCAppendQuadsData&) OVERRIDE;
23 virtual void didDraw(CCResourceProvider*) OVERRIDE;
24 virtual CCResourceProvider::ResourceId contentsResourceId() const OVERRIDE;
25 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE;
26 virtual void didLoseContext() OVERRIDE;
27 void setResourceId(unsigned id) { m_resourceId = id; }
28 void setDecorationLayout(const IntSize& imageBounds, const IntRect& aperture );
29
30 protected:
31 explicit CCDecorationLayerImpl(int id);
32
33 private:
34
35 virtual const char* layerTypeAsString() const OVERRIDE { return "DecorationL ayer"; }
36
37 // The size of the decoration bitmap in pixels.
38 IntSize m_imageBounds;
39
40 // The transparent center region that shows the parent layer's contents in i mage space.
41 IntRect m_imageAperture;
42
43 CCResourceProvider::ResourceId m_resourceId;
44 };
45
46 }
47
48 #endif // CCDecorationLayerImpl_h
OLDNEW
« no previous file with comments | « no previous file | cc/CCDecorationLayerImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698