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

Side by Side Diff: cc/test/FakeWebCompositorOutputSurface.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/CCYUVVideoDrawQuad.cpp ('k') | no next file » | 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 FakeWebCompositorOutputSurface_h 5 #ifndef FakeWebCompositorOutputSurface_h
6 #define FakeWebCompositorOutputSurface_h 6 #define FakeWebCompositorOutputSurface_h
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "FakeWebCompositorSoftwareOutputDevice.h" 9 #include "FakeWebCompositorSoftwareOutputDevice.h"
10 #include <public/WebCompositorOutputSurface.h> 10 #include <public/WebCompositorOutputSurface.h>
11 #include <public/WebGraphicsContext3D.h> 11 #include <public/WebGraphicsContext3D.h>
12 #include <wtf/OwnPtr.h> 12 #include <wtf/OwnPtr.h>
13 #include <wtf/PassOwnPtr.h> 13 #include <wtf/PassOwnPtr.h>
14 14
15 namespace WebKit { 15 namespace WebKit {
16 16
17 class FakeWebCompositorOutputSurface : public WebCompositorOutputSurface { 17 class FakeWebCompositorOutputSurface : public WebCompositorOutputSurface {
18 public: 18 public:
19 static inline scoped_ptr<FakeWebCompositorOutputSurface> create(PassOwnPtr<W ebGraphicsContext3D> context3D) 19 static inline scoped_ptr<FakeWebCompositorOutputSurface> create(PassOwnPtr<W ebGraphicsContext3D> context3D)
20 { 20 {
21 return scoped_ptr<FakeWebCompositorOutputSurface>(new FakeWebCompositorO utputSurface(context3D)); 21 return make_scoped_ptr(new FakeWebCompositorOutputSurface(context3D));
22 } 22 }
23 23
24 static inline scoped_ptr<FakeWebCompositorOutputSurface> createSoftware(Pass OwnPtr<WebCompositorSoftwareOutputDevice> softwareDevice) 24 static inline scoped_ptr<FakeWebCompositorOutputSurface> createSoftware(Pass OwnPtr<WebCompositorSoftwareOutputDevice> softwareDevice)
25 { 25 {
26 return scoped_ptr<FakeWebCompositorOutputSurface>(new FakeWebCompositorO utputSurface(softwareDevice)); 26 return make_scoped_ptr(new FakeWebCompositorOutputSurface(softwareDevice ));
27 } 27 }
28 28
29 virtual bool bindToClient(WebCompositorOutputSurfaceClient* client) OVERRIDE 29 virtual bool bindToClient(WebCompositorOutputSurfaceClient* client) OVERRIDE
30 { 30 {
31 if (!m_context3D) 31 if (!m_context3D)
32 return true; 32 return true;
33 ASSERT(client); 33 ASSERT(client);
34 if (!m_context3D->makeContextCurrent()) 34 if (!m_context3D->makeContextCurrent())
35 return false; 35 return false;
36 m_client = client; 36 m_client = client;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 68
69 OwnPtr<WebGraphicsContext3D> m_context3D; 69 OwnPtr<WebGraphicsContext3D> m_context3D;
70 OwnPtr<WebCompositorSoftwareOutputDevice> m_softwareDevice; 70 OwnPtr<WebCompositorSoftwareOutputDevice> m_softwareDevice;
71 Capabilities m_capabilities; 71 Capabilities m_capabilities;
72 WebCompositorOutputSurfaceClient* m_client; 72 WebCompositorOutputSurfaceClient* m_client;
73 }; 73 };
74 74
75 } // namespace WebKit 75 } // namespace WebKit
76 76
77 #endif // FakeWebCompositorOutputSurface_h 77 #endif // FakeWebCompositorOutputSurface_h
OLDNEW
« no previous file with comments | « cc/CCYUVVideoDrawQuad.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698