Fix a type mismatch on Windows caused by r201738.
[chromium-blink-merge.git] / cc / test / fake_proxy.h
blobb806df425a3c4f1e9314308682dfa2c8201142ca
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
3 // found in the LICENSE file.
5 #ifndef CC_TEST_FAKE_PROXY_H_
6 #define CC_TEST_FAKE_PROXY_H_
8 #include "cc/base/thread.h"
9 #include "cc/trees/layer_tree_host.h"
10 #include "cc/trees/proxy.h"
12 namespace cc {
14 class FakeProxy : public Proxy {
15 public:
16 explicit FakeProxy(scoped_ptr<Thread> impl_thread)
17 : Proxy(impl_thread.Pass()),
18 layer_tree_host_(NULL) {}
20 void SetLayerTreeHost(LayerTreeHost* host);
22 virtual bool CompositeAndReadback(void* pixels, gfx::Rect rect) OVERRIDE;
23 virtual void FinishAllRendering() OVERRIDE {}
24 virtual bool IsStarted() const OVERRIDE;
25 virtual void SetLayerTreeHostClientReady() OVERRIDE {}
26 virtual void SetVisible(bool visible) OVERRIDE {}
27 virtual void CreateAndInitializeOutputSurface() OVERRIDE;
28 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE;
29 virtual void SetNeedsAnimate() OVERRIDE {}
30 virtual void SetNeedsCommit() OVERRIDE {}
31 virtual void SetNeedsRedraw(gfx::Rect damage_rect) OVERRIDE {}
32 virtual void SetDeferCommits(bool defer_commits) OVERRIDE {}
33 virtual void MainThreadHasStoppedFlinging() OVERRIDE {}
34 virtual bool CommitRequested() const OVERRIDE;
35 virtual void Start(scoped_ptr<OutputSurface> first_output_surface) OVERRIDE {}
36 virtual void Stop() OVERRIDE {}
37 virtual void ForceSerializeOnSwapBuffers() OVERRIDE {}
38 virtual size_t MaxPartialTextureUpdates() const OVERRIDE;
39 virtual void AcquireLayerTextures() OVERRIDE {}
40 virtual bool CommitPendingForTesting() OVERRIDE;
41 virtual skia::RefPtr<SkPicture> CapturePicture() OVERRIDE;
42 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE;
44 virtual RendererCapabilities& GetRendererCapabilities();
45 void SetMaxPartialTextureUpdates(size_t max);
47 private:
48 RendererCapabilities capabilities_;
49 size_t max_partial_texture_updates_;
50 LayerTreeHost* layer_tree_host_;
53 } // namespace cc
55 #endif // CC_TEST_FAKE_PROXY_H_