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

Side by Side Diff: cc/output/output_surface_unittest.cc

Issue 14772021: cc::OutputSurfaceClient::InitializeForGL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win compile by including ContextProvider from output_surface_client.h Created 7 years, 6 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/output/output_surface_client.h ('k') | cc/scheduler/frame_rate_controller.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #include "cc/output/output_surface.h" 5 #include "cc/output/output_surface.h"
6 #include "cc/output/output_surface_client.h" 6 #include "cc/output/output_surface_client.h"
7 #include "cc/test/test_web_graphics_context_3d.h" 7 #include "cc/test/test_web_graphics_context_3d.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 10 matching lines...) Expand all
21 21
22 TestOutputSurface(scoped_ptr<WebKit::WebGraphicsContext3D> context3d, 22 TestOutputSurface(scoped_ptr<WebKit::WebGraphicsContext3D> context3d,
23 scoped_ptr<cc::SoftwareOutputDevice> software_device) 23 scoped_ptr<cc::SoftwareOutputDevice> software_device)
24 : OutputSurface(context3d.Pass(), software_device.Pass()) {} 24 : OutputSurface(context3d.Pass(), software_device.Pass()) {}
25 25
26 OutputSurfaceClient* client() { return client_; } 26 OutputSurfaceClient* client() { return client_; }
27 }; 27 };
28 28
29 class FakeOutputSurfaceClient : public OutputSurfaceClient { 29 class FakeOutputSurfaceClient : public OutputSurfaceClient {
30 public: 30 public:
31 virtual bool DeferredInitialize(
32 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE {
33 return true;
34 }
31 virtual void SetNeedsRedrawRect(gfx::Rect damage_rect) OVERRIDE {} 35 virtual void SetNeedsRedrawRect(gfx::Rect damage_rect) OVERRIDE {}
32 virtual void OnVSyncParametersChanged(base::TimeTicks timebase, 36 virtual void OnVSyncParametersChanged(base::TimeTicks timebase,
33 base::TimeDelta interval) OVERRIDE {} 37 base::TimeDelta interval) OVERRIDE {}
34 virtual void BeginFrame(base::TimeTicks frame_time) OVERRIDE {} 38 virtual void BeginFrame(base::TimeTicks frame_time) OVERRIDE {}
35 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack) 39 virtual void OnSendFrameToParentCompositorAck(const CompositorFrameAck& ack)
36 OVERRIDE {} 40 OVERRIDE {}
37 virtual void OnSwapBuffersComplete() OVERRIDE {} 41 virtual void OnSwapBuffersComplete() OVERRIDE {}
38 virtual void DidLoseOutputSurface() OVERRIDE {} 42 virtual void DidLoseOutputSurface() OVERRIDE {}
39 virtual void SetExternalDrawConstraints(const gfx::Transform& transform, 43 virtual void SetExternalDrawConstraints(const gfx::Transform& transform,
40 gfx::Rect viewport) OVERRIDE {} 44 gfx::Rect viewport) OVERRIDE {}
(...skipping 23 matching lines...) Expand all
64 context3d.PassAs<WebKit::WebGraphicsContext3D>()); 68 context3d.PassAs<WebKit::WebGraphicsContext3D>());
65 EXPECT_EQ(NULL, output_surface.client()); 69 EXPECT_EQ(NULL, output_surface.client());
66 70
67 FakeOutputSurfaceClient client; 71 FakeOutputSurfaceClient client;
68 EXPECT_FALSE(output_surface.BindToClient(&client)); 72 EXPECT_FALSE(output_surface.BindToClient(&client));
69 EXPECT_EQ(NULL, output_surface.client()); 73 EXPECT_EQ(NULL, output_surface.client());
70 } 74 }
71 75
72 } // namespace 76 } // namespace
73 } // namespace cc 77 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/output_surface_client.h ('k') | cc/scheduler/frame_rate_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698