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

Side by Side Diff: cc/CCRenderPass.h

Issue 10914268: Change cc files from namespace WebCore to cc (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased 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 | « cc/CCQuadSink.h ('k') | cc/CCRenderPass.cpp » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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 CCRenderPass_h 5 #ifndef CCRenderPass_h
6 #define CCRenderPass_h 6 #define CCRenderPass_h
7 7
8 #include "CCDrawQuad.h" 8 #include "CCDrawQuad.h"
9 #include "CCOcclusionTracker.h" 9 #include "CCOcclusionTracker.h"
10 #include "CCSharedQuadState.h" 10 #include "CCSharedQuadState.h"
11 #include "FloatRect.h"
11 #include "SkColor.h" 12 #include "SkColor.h"
12 #include <public/WebFilterOperations.h> 13 #include <public/WebFilterOperations.h>
13 #include <public/WebTransformationMatrix.h> 14 #include <public/WebTransformationMatrix.h>
14 #include <wtf/HashMap.h> 15 #include <wtf/HashMap.h>
15 #include <wtf/PassOwnPtr.h> 16 #include <wtf/PassOwnPtr.h>
16 #include <wtf/Vector.h> 17 #include <wtf/Vector.h>
17 18
18 namespace WebCore { 19 namespace cc {
19 20
20 class CCLayerImpl; 21 class CCLayerImpl;
21 class CCRenderSurface; 22 class CCRenderSurface;
22 23
23 struct CCAppendQuadsData; 24 struct CCAppendQuadsData;
24 25
25 // A list of CCDrawQuad objects, sorted internally in front-to-back order. 26 // A list of CCDrawQuad objects, sorted internally in front-to-back order.
26 class CCQuadList : public Vector<OwnPtr<CCDrawQuad> > { 27 class CCQuadList : public Vector<OwnPtr<CCDrawQuad> > {
27 public: 28 public:
28 typedef reverse_iterator backToFrontIterator; 29 typedef reverse_iterator backToFrontIterator;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 CCSharedQuadStateList m_sharedQuadStateList; 97 CCSharedQuadStateList m_sharedQuadStateList;
97 WebKit::WebTransformationMatrix m_transformToRootTarget; 98 WebKit::WebTransformationMatrix m_transformToRootTarget;
98 IntRect m_outputRect; 99 IntRect m_outputRect;
99 FloatRect m_damageRect; 100 FloatRect m_damageRect;
100 bool m_hasTransparentBackground; 101 bool m_hasTransparentBackground;
101 bool m_hasOcclusionFromOutsideTargetSurface; 102 bool m_hasOcclusionFromOutsideTargetSurface;
102 WebKit::WebFilterOperations m_filters; 103 WebKit::WebFilterOperations m_filters;
103 WebKit::WebFilterOperations m_backgroundFilters; 104 WebKit::WebFilterOperations m_backgroundFilters;
104 }; 105 };
105 106
106 } // namespace WebCore 107 } // namespace cc
107 108
108 namespace WTF { 109 namespace WTF {
109 template<> struct HashTraits<WebCore::CCRenderPass::Id> : GenericHashTraits<WebC ore::CCRenderPass::Id> { 110 template<> struct HashTraits<cc::CCRenderPass::Id> : GenericHashTraits<cc::CCRen derPass::Id> {
110 static const bool emptyValueIsZero = false; 111 static const bool emptyValueIsZero = false;
111 static const bool needsDestruction = false; 112 static const bool needsDestruction = false;
112 static WebCore::CCRenderPass::Id emptyValue() { return WebCore::CCRenderPass ::Id(0, 0); } 113 static cc::CCRenderPass::Id emptyValue() { return cc::CCRenderPass::Id(0, 0) ; }
113 static void constructDeletedValue(WebCore::CCRenderPass::Id& slot) { slot = WebCore::CCRenderPass::Id(-1, -1); } 114 static void constructDeletedValue(cc::CCRenderPass::Id& slot) { slot = cc::C CRenderPass::Id(-1, -1); }
114 static bool isDeletedValue(WebCore::CCRenderPass::Id value) { return value.l ayerId == -1 && value.index == -1; } 115 static bool isDeletedValue(cc::CCRenderPass::Id value) { return value.layerI d == -1 && value.index == -1; }
115 }; 116 };
116 template<> struct IntHash<WebCore::CCRenderPass::Id> { 117 template<> struct IntHash<cc::CCRenderPass::Id> {
117 static unsigned hash(const WebCore::CCRenderPass::Id& key) { return PairHash <int, int>::hash(std::make_pair(key.layerId, key.index)); } 118 static unsigned hash(const cc::CCRenderPass::Id& key) { return PairHash<int, int>::hash(std::make_pair(key.layerId, key.index)); }
118 static bool equal(const WebCore::CCRenderPass::Id& a, const WebCore::CCRende rPass::Id& b) { return a == b; } 119 static bool equal(const cc::CCRenderPass::Id& a, const cc::CCRenderPass::Id& b) { return a == b; }
119 static const bool safeToCompareToEmptyOrDeleted = true; 120 static const bool safeToCompareToEmptyOrDeleted = true;
120 }; 121 };
121 template<> struct DefaultHash<WebCore::CCRenderPass::Id> { 122 template<> struct DefaultHash<cc::CCRenderPass::Id> {
122 typedef IntHash<WebCore::CCRenderPass::Id> Hash; 123 typedef IntHash<cc::CCRenderPass::Id> Hash;
123 }; 124 };
124 } // namespace WTF 125 } // namespace WTF
125 126
126 namespace WebCore { 127 namespace cc {
127 typedef Vector<CCRenderPass*> CCRenderPassList; 128 typedef Vector<CCRenderPass*> CCRenderPassList;
128 typedef HashMap<CCRenderPass::Id, OwnPtr<CCRenderPass> > CCRenderPassIdHashMap; 129 typedef HashMap<CCRenderPass::Id, OwnPtr<CCRenderPass> > CCRenderPassIdHashMap;
129 } // namespace WebCore 130 } // namespace cc
130 131
131 #endif 132 #endif
OLDNEW
« no previous file with comments | « cc/CCQuadSink.h ('k') | cc/CCRenderPass.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698