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

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

Issue 645853008: Standardize usage of virtual/override/final in cc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted Created 6 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
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | cc/test/fake_painted_scrollbar_layer.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 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_CLIENT_H_ 5 #ifndef CC_TEST_FAKE_OUTPUT_SURFACE_CLIENT_H_
6 #define CC_TEST_FAKE_OUTPUT_SURFACE_CLIENT_H_ 6 #define CC_TEST_FAKE_OUTPUT_SURFACE_CLIENT_H_
7 7
8 #include "cc/output/managed_memory_policy.h" 8 #include "cc/output/managed_memory_policy.h"
9 #include "cc/output/output_surface_client.h" 9 #include "cc/output/output_surface_client.h"
10 10
(...skipping 12 matching lines...) Expand all
23 memory_policy_(0) {} 23 memory_policy_(0) {}
24 24
25 explicit FakeOutputSurfaceClient(OutputSurface* output_surface) 25 explicit FakeOutputSurfaceClient(OutputSurface* output_surface)
26 : output_surface_(output_surface), 26 : output_surface_(output_surface),
27 begin_frame_count_(0), 27 begin_frame_count_(0),
28 swap_count_(0), 28 swap_count_(0),
29 deferred_initialize_called_(false), 29 deferred_initialize_called_(false),
30 did_lose_output_surface_called_(false), 30 did_lose_output_surface_called_(false),
31 memory_policy_(0) {} 31 memory_policy_(0) {}
32 32
33 virtual void DeferredInitialize() override; 33 void DeferredInitialize() override;
34 virtual void ReleaseGL() override; 34 void ReleaseGL() override;
35 virtual void CommitVSyncParameters(base::TimeTicks timebase, 35 void CommitVSyncParameters(base::TimeTicks timebase,
36 base::TimeDelta interval) override {} 36 base::TimeDelta interval) override {}
37 virtual void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override {} 37 void SetNeedsRedrawRect(const gfx::Rect& damage_rect) override {}
38 virtual void BeginFrame(const BeginFrameArgs& args) override; 38 void BeginFrame(const BeginFrameArgs& args) override;
39 virtual void DidSwapBuffers() override; 39 void DidSwapBuffers() override;
40 virtual void DidSwapBuffersComplete() override {} 40 void DidSwapBuffersComplete() override {}
41 virtual void ReclaimResources(const CompositorFrameAck* ack) override {} 41 void ReclaimResources(const CompositorFrameAck* ack) override {}
42 virtual void DidLoseOutputSurface() override; 42 void DidLoseOutputSurface() override;
43 virtual void SetExternalDrawConstraints( 43 void SetExternalDrawConstraints(
44 const gfx::Transform& transform, 44 const gfx::Transform& transform,
45 const gfx::Rect& viewport, 45 const gfx::Rect& viewport,
46 const gfx::Rect& clip, 46 const gfx::Rect& clip,
47 const gfx::Rect& viewport_rect_for_tile_priority, 47 const gfx::Rect& viewport_rect_for_tile_priority,
48 const gfx::Transform& transform_for_tile_priority, 48 const gfx::Transform& transform_for_tile_priority,
49 bool resourceless_software_draw) override {} 49 bool resourceless_software_draw) override {}
50 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; 50 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
51 virtual void SetTreeActivationCallback(const base::Closure&) override {} 51 void SetTreeActivationCallback(const base::Closure&) override {}
52 52
53 int begin_frame_count() { return begin_frame_count_; } 53 int begin_frame_count() { return begin_frame_count_; }
54 int swap_count() { return swap_count_; } 54 int swap_count() { return swap_count_; }
55 55
56 bool deferred_initialize_called() { 56 bool deferred_initialize_called() {
57 return deferred_initialize_called_; 57 return deferred_initialize_called_;
58 } 58 }
59 59
60 bool did_lose_output_surface_called() { 60 bool did_lose_output_surface_called() {
61 return did_lose_output_surface_called_; 61 return did_lose_output_surface_called_;
62 } 62 }
63 63
64 const ManagedMemoryPolicy& memory_policy() const { return memory_policy_; } 64 const ManagedMemoryPolicy& memory_policy() const { return memory_policy_; }
65 65
66 private: 66 private:
67 OutputSurface* output_surface_; 67 OutputSurface* output_surface_;
68 int begin_frame_count_; 68 int begin_frame_count_;
69 int swap_count_; 69 int swap_count_;
70 bool deferred_initialize_called_; 70 bool deferred_initialize_called_;
71 bool did_lose_output_surface_called_; 71 bool did_lose_output_surface_called_;
72 ManagedMemoryPolicy memory_policy_; 72 ManagedMemoryPolicy memory_policy_;
73 }; 73 };
74 74
75 } // namespace cc 75 } // namespace cc
76 76
77 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_CLIENT_H_ 77 #endif // CC_TEST_FAKE_OUTPUT_SURFACE_CLIENT_H_
OLDNEW
« no previous file with comments | « cc/test/fake_output_surface.h ('k') | cc/test/fake_painted_scrollbar_layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698