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

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

Issue 11192030: cc: Switch to Chromium DCHECKs LOGs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseonenne 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/stubs/config.h ('k') | cc/test/fake_web_compositor_software_output_device.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 FakeWebCompositorOutputSurface_h 5 #ifndef FakeWebCompositorOutputSurface_h
6 #define FakeWebCompositorOutputSurface_h 6 #define FakeWebCompositorOutputSurface_h
7 7
8 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
9 #include "cc/test/fake_web_compositor_software_output_device.h" 10 #include "cc/test/fake_web_compositor_software_output_device.h"
10 #include <public/WebCompositorOutputSurface.h> 11 #include <public/WebCompositorOutputSurface.h>
11 #include <public/WebGraphicsContext3D.h> 12 #include <public/WebGraphicsContext3D.h>
12 13
13 namespace WebKit { 14 namespace WebKit {
14 15
15 class FakeWebCompositorOutputSurface : public WebCompositorOutputSurface { 16 class FakeWebCompositorOutputSurface : public WebCompositorOutputSurface {
16 public: 17 public:
17 static inline scoped_ptr<FakeWebCompositorOutputSurface> create(scoped_ptr<W ebGraphicsContext3D> context3D) 18 static inline scoped_ptr<FakeWebCompositorOutputSurface> create(scoped_ptr<W ebGraphicsContext3D> context3D)
18 { 19 {
19 return make_scoped_ptr(new FakeWebCompositorOutputSurface(context3D.Pass ())); 20 return make_scoped_ptr(new FakeWebCompositorOutputSurface(context3D.Pass ()));
20 } 21 }
21 22
22 static inline scoped_ptr<FakeWebCompositorOutputSurface> createSoftware(scop ed_ptr<WebCompositorSoftwareOutputDevice> softwareDevice) 23 static inline scoped_ptr<FakeWebCompositorOutputSurface> createSoftware(scop ed_ptr<WebCompositorSoftwareOutputDevice> softwareDevice)
23 { 24 {
24 return make_scoped_ptr(new FakeWebCompositorOutputSurface(softwareDevice .Pass())); 25 return make_scoped_ptr(new FakeWebCompositorOutputSurface(softwareDevice .Pass()));
25 } 26 }
26 27
27 virtual bool bindToClient(WebCompositorOutputSurfaceClient* client) OVERRIDE 28 virtual bool bindToClient(WebCompositorOutputSurfaceClient* client) OVERRIDE
28 { 29 {
29 if (!m_context3D) 30 if (!m_context3D)
30 return true; 31 return true;
31 ASSERT(client); 32 DCHECK(client);
32 if (!m_context3D->makeContextCurrent()) 33 if (!m_context3D->makeContextCurrent())
33 return false; 34 return false;
34 m_client = client; 35 m_client = client;
35 return true; 36 return true;
36 } 37 }
37 38
38 virtual const Capabilities& capabilities() const OVERRIDE 39 virtual const Capabilities& capabilities() const OVERRIDE
39 { 40 {
40 return m_capabilities; 41 return m_capabilities;
41 } 42 }
(...skipping 24 matching lines...) Expand all
66 67
67 scoped_ptr<WebGraphicsContext3D> m_context3D; 68 scoped_ptr<WebGraphicsContext3D> m_context3D;
68 scoped_ptr<WebCompositorSoftwareOutputDevice> m_softwareDevice; 69 scoped_ptr<WebCompositorSoftwareOutputDevice> m_softwareDevice;
69 Capabilities m_capabilities; 70 Capabilities m_capabilities;
70 WebCompositorOutputSurfaceClient* m_client; 71 WebCompositorOutputSurfaceClient* m_client;
71 }; 72 };
72 73
73 } // namespace WebKit 74 } // namespace WebKit
74 75
75 #endif // FakeWebCompositorOutputSurface_h 76 #endif // FakeWebCompositorOutputSurface_h
OLDNEW
« no previous file with comments | « cc/stubs/config.h ('k') | cc/test/fake_web_compositor_software_output_device.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698