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

Side by Side Diff: cc/CCDirectRenderer.h

Issue 11047032: cc: Use syntax sugar 'make_scoped_ptr' in more places. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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/CCDebugBorderDrawQuad.cpp ('k') | cc/CCFontAtlas.h » ('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 CCDirectRenderer_h 5 #ifndef CCDirectRenderer_h
6 #define CCDirectRenderer_h 6 #define CCDirectRenderer_h
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "CCRenderer.h" 9 #include "CCRenderer.h"
10 #include "CCResourceProvider.h" 10 #include "CCResourceProvider.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 FloatRect rootDamageRect; 42 FloatRect rootDamageRect;
43 43
44 WebKit::WebTransformationMatrix projectionMatrix; 44 WebKit::WebTransformationMatrix projectionMatrix;
45 WebKit::WebTransformationMatrix windowMatrix; 45 WebKit::WebTransformationMatrix windowMatrix;
46 bool flippedY; 46 bool flippedY;
47 FloatRect scissorRectInRenderPassSpace; 47 FloatRect scissorRectInRenderPassSpace;
48 }; 48 };
49 49
50 class CachedTexture : public CCScopedTexture { 50 class CachedTexture : public CCScopedTexture {
51 public: 51 public:
52 static scoped_ptr<CachedTexture> create(CCResourceProvider* resourceProv ider) { return scoped_ptr<CachedTexture>(new CachedTexture(resourceProvider)); } 52 static scoped_ptr<CachedTexture> create(CCResourceProvider* resourceProv ider) {
53 virtual ~CachedTexture() { } 53 return make_scoped_ptr(new CachedTexture(resourceProvider));
54 }
55 virtual ~CachedTexture() {}
54 56
55 bool isComplete() const { return m_isComplete; } 57 bool isComplete() const { return m_isComplete; }
56 void setIsComplete(bool isComplete) { m_isComplete = isComplete; } 58 void setIsComplete(bool isComplete) { m_isComplete = isComplete; }
57 59
58 protected: 60 protected:
59 explicit CachedTexture(CCResourceProvider* resourceProvider) 61 explicit CachedTexture(CCResourceProvider* resourceProvider)
60 : CCScopedTexture(resourceProvider) 62 : CCScopedTexture(resourceProvider)
61 , m_isComplete(false) 63 , m_isComplete(false)
62 { 64 {
63 } 65 }
(...skipping 27 matching lines...) Expand all
91 virtual void finishDrawingFrame(DrawingFrame&) = 0; 93 virtual void finishDrawingFrame(DrawingFrame&) = 0;
92 virtual bool flippedFramebuffer() const = 0; 94 virtual bool flippedFramebuffer() const = 0;
93 95
94 ScopedPtrHashMap<CCRenderPass::Id, CachedTexture> m_renderPassTextures; 96 ScopedPtrHashMap<CCRenderPass::Id, CachedTexture> m_renderPassTextures;
95 CCResourceProvider* m_resourceProvider; 97 CCResourceProvider* m_resourceProvider;
96 98
97 private: 99 private:
98 DISALLOW_COPY_AND_ASSIGN(CCDirectRenderer); 100 DISALLOW_COPY_AND_ASSIGN(CCDirectRenderer);
99 }; 101 };
100 102
101 } 103 } // namespace cc
102 104
103 #endif // CCDirectRenderer_h 105 #endif // CCDirectRenderer_h
OLDNEW
« no previous file with comments | « cc/CCDebugBorderDrawQuad.cpp ('k') | cc/CCFontAtlas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698