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

Side by Side Diff: android_webview/browser/compositor_frame_consumer.h

Issue 1911433002: Refactor BrowserViewRenderer-RenderThreadManager relationship. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cope with SetCompositorFrameConsumer(nullptr) Created 4 years, 8 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
(Empty)
1 // Copyright 2016 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 ANDROID_WEBVIEW_BROWSER_COMPOSITOR_FRAME_CONSUMER_H_
6 #define ANDROID_WEBVIEW_BROWSER_COMPOSITOR_FRAME_CONSUMER_H_
7
8 #include <map>
9
10 #include "android_webview/browser/parent_compositor_draw_constraints.h"
11 #include "cc/output/compositor_frame_ack.h"
boliu 2016/04/21 17:05:39 Only need cc/resources/returned_resource.h for cc:
Tobias Sargeant 2016/04/21 17:21:12 Ok. Just moved the include from render_thread_mana
Tobias Sargeant 2016/04/21 17:48:27 Done.
12 #include "ui/gfx/geometry/vector2d.h"
13
14 namespace android_webview {
15
16 class ChildFrame;
17 class CompositorFrameProducer;
18
19 class CompositorFrameConsumer {
20 public:
21 struct ReturnedResources {
22 ReturnedResources();
23 ~ReturnedResources();
24
25 uint32_t output_surface_id;
26 cc::ReturnedResourceArray resources;
27 };
28 using ReturnedResourcesMap = std::map<uint32_t, ReturnedResources>;
29
30 virtual void SetCompositorFrameProducer(CompositorFrameProducer*) = 0;
31 virtual void SetScrollOffsetOnUI(gfx::Vector2d scroll_offset) = 0;
32 virtual void SetFrameOnUI(std::unique_ptr<ChildFrame> frame) = 0;
33 virtual void InitializeHardwareDrawIfNeededOnUI() = 0;
34 virtual ParentCompositorDrawConstraints GetParentDrawConstraintsOnUI()
35 const = 0;
36 virtual void SwapReturnedResourcesOnUI(
37 ReturnedResourcesMap* returned_resource_map) = 0;
38 virtual bool ReturnedResourcesEmptyOnUI() const = 0;
39 virtual std::unique_ptr<ChildFrame> PassUncommittedFrameOnUI() = 0;
40 virtual bool HasFrameOnUI() const = 0;
41 virtual void DeleteHardwareRendererOnUI() = 0;
42
43 virtual void OnCompositorFrameProducerWillDestroy() = 0;
44
45 protected:
46 virtual ~CompositorFrameConsumer() {}
47 };
48
49 } // namespace android_webview
50
51 #endif // ANDROID_WEBVIEW_BROWSER_COMPOSITOR_FRAME_PRODUCER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698