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

Side by Side Diff: content/public/browser/android/synchronous_compositor.h

Issue 817603002: cc: Make scheduling be driven by vsync for android webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix misc bugs introduced in last two patches Created 5 years, 10 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
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 CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_
6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ 6 #define CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "content/common/content_export.h" 9 #include "content/common/content_export.h"
10 #include "gpu/command_buffer/service/in_process_command_buffer.h" 10 #include "gpu/command_buffer/service/in_process_command_buffer.h"
11 #include "ui/gfx/geometry/rect.h" 11 #include "ui/gfx/geometry/rect.h"
12 #include "ui/gfx/geometry/size.h" 12 #include "ui/gfx/geometry/size.h"
13 13
14 class SkCanvas; 14 class SkCanvas;
15 15
16 namespace cc { 16 namespace cc {
17 class BeginFrameArgs;
17 class CompositorFrame; 18 class CompositorFrame;
18 class CompositorFrameAck; 19 class CompositorFrameAck;
19 } 20 }
20 21
21 namespace gfx { 22 namespace gfx {
22 class Transform; 23 class Transform;
23 }; 24 };
24 25
25 namespace gpu { 26 namespace gpu {
26 class GLInProcessContext; 27 class GLInProcessContext;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 virtual bool DemandDrawSw(SkCanvas* canvas) = 0; 81 virtual bool DemandDrawSw(SkCanvas* canvas) = 0;
81 82
82 // Set the memory limit policy of this compositor. 83 // Set the memory limit policy of this compositor.
83 virtual void SetMemoryPolicy(size_t bytes_limit) = 0; 84 virtual void SetMemoryPolicy(size_t bytes_limit) = 0;
84 85
85 // Should be called by the embedder after the embedder had modified the 86 // Should be called by the embedder after the embedder had modified the
86 // scroll offset of the root layer (as returned by 87 // scroll offset of the root layer (as returned by
87 // SynchronousCompositorClient::GetTotalRootLayerScrollOffset). 88 // SynchronousCompositorClient::GetTotalRootLayerScrollOffset).
88 virtual void DidChangeRootLayerScrollOffset() = 0; 89 virtual void DidChangeRootLayerScrollOffset() = 0;
89 90
91 // Called by the embedder to notify that the compositor is active. The
92 // compositor won't ask for vsyncs when it's active. NOTE: The compositor
93 // starts off as inactive and needs a SetActive(true) call to begin.
94 virtual void SetIsActive(bool is_active) = 0;
95
96 // VSync callback from the platform.
97 virtual void SendBeginFrame(cc::BeginFrameArgs args) = 0;
boliu 2015/02/11 02:28:14 No need to expose this to public interface. It's o
98
90 protected: 99 protected:
91 virtual ~SynchronousCompositor() {} 100 virtual ~SynchronousCompositor() {}
92 }; 101 };
93 102
94 } // namespace content 103 } // namespace content
95 104
96 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ 105 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698