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

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: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/CCDecorationLayerImpl.cpp » ('j') | cc/DecorationLayerChromium.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved.
danakj 2012/09/24 14:35:00 nit: switch to the chromium copyright style for ne
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
18 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26 #ifndef CCDecorationLayerImpl_h
27 #define CCDecorationLayerImpl_h
28
29 #include "CCLayerImpl.h"
30 #include <public/WebTransformationMatrix.h>
31
32 namespace cc {
33
34
35 class CCDecorationLayerImpl : public CCLayerImpl {
36 public:
37 static PassOwnPtr<CCDecorationLayerImpl> create(int id)
38 {
39 return adoptPtr(new CCDecorationLayerImpl(id));
40 }
41 virtual ~CCDecorationLayerImpl();
42
43 virtual void willDraw(CCResourceProvider*) OVERRIDE;
44 virtual void appendQuads(CCQuadSink&, CCAppendQuadsData&) OVERRIDE;
45 virtual void didDraw(CCResourceProvider*) OVERRIDE;
46
47 virtual CCResourceProvider::ResourceId contentsResourceId() const OVERRIDE;
48
49 virtual void dumpLayerProperties(std::string*, int indent) const OVERRIDE;
50
51 virtual Region visibleContentOpaqueRegion() const OVERRIDE;
52 virtual void didLoseContext() OVERRIDE;
53
54 void setResourceId(unsigned id) { m_resourceId = id; }
55 void setDecorationLayout(const IntSize& imageBounds, const IntRect& aperture );
56
57 protected:
58 explicit CCDecorationLayerImpl(int id);
59
60 private:
61
62 virtual const char* layerTypeAsString() const OVERRIDE { return "DecorationL ayer"; }
63
64 // The size of the decoration bitmap in pixels.
65 IntSize m_imageBounds;
66
67 // The transparent center region that shows the parent layer's contents in i mage space.
68 IntRect m_imageAperture;
69
70 CCResourceProvider::ResourceId m_resourceId;
71 };
72
73 }
74
75 #endif // CCDecorationLayerImpl_h
OLDNEW
« no previous file with comments | « no previous file | cc/CCDecorationLayerImpl.cpp » ('j') | cc/DecorationLayerChromium.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698