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

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

Issue 1533773002: Delete CC. (Closed) Base URL: git@github.com:domokit/mojo.git@cl-2e
Patch Set: rebase Created 5 years 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
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | cc/test/fake_output_surface_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_CLIENT_H_
6 #define CC_TEST_FAKE_OUTPUT_SURFACE_CLIENT_H_
7
8 #include "cc/output/managed_memory_policy.h"
9 #include "cc/output/output_surface_client.h"
10
11 namespace cc {
12
13 class OutputSurface;
14
15 class FakeOutputSurfaceClient : public OutputSurfaceClient {
16 public:
17 FakeOutputSurfaceClient()
18 : output_surface_(NULL),
19 swap_count_(0),
20 deferred_initialize_called_(false),
21 did_lose_output_surface_called_(false),
22 memory_policy_(0) {}
23
24 explicit FakeOutputSurfaceClient(OutputSurface* output_surface)
25 : output_surface_(output_surface),
26 swap_count_(0),
27 deferred_initialize_called_(false),
28 did_lose_output_surface_called_(false),
29 memory_policy_(0) {}
30
31 void DeferredInitialize() override;
32 void ReleaseGL() override;
33 void CommitVSyncParameters(base::TimeTicks timebase,
34 base::TimeDelta interval) override {}
35 void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override {}
36 void DidSwapBuffers() override;
37 void DidSwapBuffersComplete() override {}
38 void ReclaimResources(const CompositorFrameAck* ack) override {}
39 void DidLoseOutputSurface() override;
40 void SetExternalDrawConstraints(
41 const gfx::Transform& transform,
42 const gfx::Rect& viewport,
43 const gfx::Rect& clip,
44 const gfx::Rect& viewport_rect_for_tile_priority,
45 const gfx::Transform& transform_for_tile_priority,
46 bool resourceless_software_draw) override {}
47 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
48 void SetTreeActivationCallback(const base::Closure&) override {}
49
50 int swap_count() { return swap_count_; }
51
52 bool deferred_initialize_called() {
53 return deferred_initialize_called_;
54 }
55
56 bool did_lose_output_surface_called() {
57 return did_lose_output_surface_called_;
58 }
59
60 const ManagedMemoryPolicy& memory_policy() const { return memory_policy_; }
61
62 private:
63 OutputSurface* output_surface_;
64 int swap_count_;
65 bool deferred_initialize_called_;
66 bool did_lose_output_surface_called_;
67 ManagedMemoryPolicy memory_policy_;
68 };
69
70 } // namespace cc
71
72 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface.cc ('k') | cc/test/fake_output_surface_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698