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

Side by Side Diff: cc/trees/thread_proxy.h

Issue 93663004: [#2] Pass gfx structs by const ref (gfx::Rect, gfx::RectF) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT, fix builds on non-linux platforms! Created 6 years, 11 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/trees/single_thread_proxy.cc ('k') | cc/trees/thread_proxy.cc » ('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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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_TREES_THREAD_PROXY_H_ 5 #ifndef CC_TREES_THREAD_PROXY_H_
6 #define CC_TREES_THREAD_PROXY_H_ 6 #define CC_TREES_THREAD_PROXY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 23 matching lines...) Expand all
34 SchedulerClient, 34 SchedulerClient,
35 ResourceUpdateControllerClient { 35 ResourceUpdateControllerClient {
36 public: 36 public:
37 static scoped_ptr<Proxy> Create( 37 static scoped_ptr<Proxy> Create(
38 LayerTreeHost* layer_tree_host, 38 LayerTreeHost* layer_tree_host,
39 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 39 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
40 40
41 virtual ~ThreadProxy(); 41 virtual ~ThreadProxy();
42 42
43 // Proxy implementation 43 // Proxy implementation
44 virtual bool CompositeAndReadback(void* pixels, gfx::Rect rect) OVERRIDE; 44 virtual bool CompositeAndReadback(void* pixels,
45 const gfx::Rect& rect) OVERRIDE;
45 virtual void FinishAllRendering() OVERRIDE; 46 virtual void FinishAllRendering() OVERRIDE;
46 virtual bool IsStarted() const OVERRIDE; 47 virtual bool IsStarted() const OVERRIDE;
47 virtual void SetLayerTreeHostClientReady() OVERRIDE; 48 virtual void SetLayerTreeHostClientReady() OVERRIDE;
48 virtual void SetVisible(bool visible) OVERRIDE; 49 virtual void SetVisible(bool visible) OVERRIDE;
49 virtual void CreateAndInitializeOutputSurface() OVERRIDE; 50 virtual void CreateAndInitializeOutputSurface() OVERRIDE;
50 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE; 51 virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE;
51 virtual void SetNeedsAnimate() OVERRIDE; 52 virtual void SetNeedsAnimate() OVERRIDE;
52 virtual void SetNeedsUpdateLayers() OVERRIDE; 53 virtual void SetNeedsUpdateLayers() OVERRIDE;
53 virtual void SetNeedsCommit() OVERRIDE; 54 virtual void SetNeedsCommit() OVERRIDE;
54 virtual void SetNeedsRedraw(gfx::Rect damage_rect) OVERRIDE; 55 virtual void SetNeedsRedraw(const gfx::Rect& damage_rect) OVERRIDE;
55 virtual void SetNextCommitWaitsForActivation() OVERRIDE; 56 virtual void SetNextCommitWaitsForActivation() OVERRIDE;
56 virtual void NotifyInputThrottledUntilCommit() OVERRIDE; 57 virtual void NotifyInputThrottledUntilCommit() OVERRIDE;
57 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; 58 virtual void SetDeferCommits(bool defer_commits) OVERRIDE;
58 virtual bool CommitRequested() const OVERRIDE; 59 virtual bool CommitRequested() const OVERRIDE;
59 virtual bool BeginMainFrameRequested() const OVERRIDE; 60 virtual bool BeginMainFrameRequested() const OVERRIDE;
60 virtual void MainThreadHasStoppedFlinging() OVERRIDE; 61 virtual void MainThreadHasStoppedFlinging() OVERRIDE;
61 virtual void Start() OVERRIDE; 62 virtual void Start() OVERRIDE;
62 virtual void Stop() OVERRIDE; 63 virtual void Stop() OVERRIDE;
63 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; 64 virtual size_t MaxPartialTextureUpdates() const OVERRIDE;
64 virtual void AcquireLayerTextures() OVERRIDE; 65 virtual void AcquireLayerTextures() OVERRIDE;
65 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; 66 virtual void ForceSerializeOnSwapBuffers() OVERRIDE;
66 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; 67 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE;
67 virtual bool CommitPendingForTesting() OVERRIDE; 68 virtual bool CommitPendingForTesting() OVERRIDE;
68 virtual scoped_ptr<base::Value> SchedulerStateAsValueForTesting() OVERRIDE; 69 virtual scoped_ptr<base::Value> SchedulerStateAsValueForTesting() OVERRIDE;
69 70
70 // LayerTreeHostImplClient implementation 71 // LayerTreeHostImplClient implementation
71 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; 72 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE;
72 virtual void DidSwapBuffersOnImplThread() OVERRIDE {} 73 virtual void DidSwapBuffersOnImplThread() OVERRIDE {}
73 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE; 74 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE;
74 virtual void BeginImplFrame(const BeginFrameArgs& args) OVERRIDE; 75 virtual void BeginImplFrame(const BeginFrameArgs& args) OVERRIDE;
75 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; 76 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE;
76 virtual void NotifyReadyToActivate() OVERRIDE; 77 virtual void NotifyReadyToActivate() OVERRIDE;
77 // Please call these 2 functions through 78 // Please call these 2 functions through
78 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect(). 79 // LayerTreeHostImpl's SetNeedsRedraw() and SetNeedsRedrawRect().
79 virtual void SetNeedsRedrawOnImplThread() OVERRIDE; 80 virtual void SetNeedsRedrawOnImplThread() OVERRIDE;
80 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect dirty_rect) OVERRIDE; 81 virtual void SetNeedsRedrawRectOnImplThread(
82 const gfx::Rect& dirty_rect) OVERRIDE;
81 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE; 83 virtual void SetNeedsManageTilesOnImplThread() OVERRIDE;
82 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; 84 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE;
83 virtual void SetNeedsCommitOnImplThread() OVERRIDE; 85 virtual void SetNeedsCommitOnImplThread() OVERRIDE;
84 virtual void PostAnimationEventsToMainThreadOnImplThread( 86 virtual void PostAnimationEventsToMainThreadOnImplThread(
85 scoped_ptr<AnimationEventsVector> queue, 87 scoped_ptr<AnimationEventsVector> queue,
86 base::Time wall_clock_time) OVERRIDE; 88 base::Time wall_clock_time) OVERRIDE;
87 virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, 89 virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes,
88 int priority_cutoff) 90 int priority_cutoff)
89 OVERRIDE; 91 OVERRIDE;
90 virtual void SendManagedMemoryStats() OVERRIDE; 92 virtual void SendManagedMemoryStats() OVERRIDE;
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 base::WeakPtrFactory<ThreadProxy> weak_factory_; 289 base::WeakPtrFactory<ThreadProxy> weak_factory_;
288 290
289 const int layer_tree_host_id_; 291 const int layer_tree_host_id_;
290 292
291 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); 293 DISALLOW_COPY_AND_ASSIGN(ThreadProxy);
292 }; 294 };
293 295
294 } // namespace cc 296 } // namespace cc
295 297
296 #endif // CC_TREES_THREAD_PROXY_H_ 298 #endif // CC_TREES_THREAD_PROXY_H_
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698