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

Side by Side Diff: cc/test/render_pass_test_common.h

Issue 11418108: cc: Make the ScopedPtrVector and ScopedPtrDeque containers act like STL vector and deque. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add DCHECK Created 8 years, 1 month 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
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 CC_TEST_RENDER_PASS_TEST_COMMON_H_ 5 #ifndef CC_TEST_RENDER_PASS_TEST_COMMON_H_
6 #define CC_TEST_RENDER_PASS_TEST_COMMON_H_ 6 #define CC_TEST_RENDER_PASS_TEST_COMMON_H_
7 7
8 #include "cc/render_pass.h" 8 #include "cc/render_pass.h"
9 9
10 namespace cc { 10 namespace cc {
11 class ResourceProvider; 11 class ResourceProvider;
12 } 12 }
13 13
14 namespace WebKitTests { 14 namespace WebKitTests {
15 15
16 class TestRenderPass : public cc::RenderPass { 16 class TestRenderPass : public cc::RenderPass {
17 public: 17 public:
18 static scoped_ptr<TestRenderPass> create(Id id, gfx::Rect outputRect, const WebKit::WebTransformationMatrix& transformToRootTarget) { 18 static scoped_ptr<TestRenderPass> create(Id id, gfx::Rect outputRect, const WebKit::WebTransformationMatrix& transformToRootTarget) {
19 return make_scoped_ptr(new TestRenderPass(id, outputRect, transformToRoo tTarget)); 19 return make_scoped_ptr(new TestRenderPass(id, outputRect, transformToRoo tTarget));
20 } 20 }
21 21
22 cc::QuadList& quadList() { return m_quadList; } 22 cc::QuadList& quadList() { return m_quadList; }
23 cc::SharedQuadStateList& sharedQuadStateList() { return m_sharedQuadStateLis t; } 23 cc::SharedQuadStateList& sharedQuadStateList() { return m_sharedQuadStateLis t; }
24 24
25 void appendQuad(scoped_ptr<cc::DrawQuad> quad) { m_quadList.append(quad.Pass ()); } 25 void appendQuad(scoped_ptr<cc::DrawQuad> quad) { m_quadList.push_back(quad.P ass()); }
26 void appendSharedQuadState(scoped_ptr<cc::SharedQuadState> state) { m_shared QuadStateList.append(state.Pass()); } 26 void appendSharedQuadState(scoped_ptr<cc::SharedQuadState> state) { m_shared QuadStateList.push_back(state.Pass()); }
27 27
28 void appendOneOfEveryQuadType(cc::ResourceProvider*); 28 void appendOneOfEveryQuadType(cc::ResourceProvider*);
29 29
30 protected: 30 protected:
31 TestRenderPass(Id id, gfx::Rect outputRect, const WebKit::WebTransformationM atrix& transformToRootTarget) 31 TestRenderPass(Id id, gfx::Rect outputRect, const WebKit::WebTransformationM atrix& transformToRootTarget)
32 : RenderPass(id, outputRect, transformToRootTarget) { } 32 : RenderPass(id, outputRect, transformToRootTarget) { }
33 }; 33 };
34 34
35 } // namespace WebKitTests 35 } // namespace WebKitTests
36 36
37 #endif // CC_TEST_RENDER_PASS_TEST_COMMON_H_ 37 #endif // CC_TEST_RENDER_PASS_TEST_COMMON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698