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

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

Issue 2096493002: Make cc::CompositorFrames movable [Part 1 of 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make CompositorFrameMetadata movable Created 4 years, 6 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 ANDROID_WEBVIEW_BROWSER_CHILD_FRAME_H_ 5 #ifndef ANDROID_WEBVIEW_BROWSER_CHILD_FRAME_H_
6 #define ANDROID_WEBVIEW_BROWSER_CHILD_FRAME_H_ 6 #define ANDROID_WEBVIEW_BROWSER_CHILD_FRAME_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "android_webview/browser/compositor_id.h" 10 #include "android_webview/browser/compositor_id.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/optional.h"
13 #include "cc/output/compositor_frame.h"
12 #include "ui/gfx/geometry/rect.h" 14 #include "ui/gfx/geometry/rect.h"
13 #include "ui/gfx/geometry/size.h" 15 #include "ui/gfx/geometry/size.h"
14 #include "ui/gfx/transform.h" 16 #include "ui/gfx/transform.h"
15 17
16 namespace cc { 18 namespace cc {
17 class CompositorFrame; 19 class CompositorFrame;
18 } 20 }
19 21
20 namespace android_webview { 22 namespace android_webview {
21 23
22 class ChildFrame { 24 class ChildFrame {
23 public: 25 public:
24 ChildFrame(uint32_t output_surface_id, 26 ChildFrame(uint32_t output_surface_id,
25 std::unique_ptr<cc::CompositorFrame> frame, 27 cc::CompositorFrame frame,
26 const CompositorID& compositor_id, 28 const CompositorID& compositor_id,
27 bool viewport_rect_for_tile_priority_empty, 29 bool viewport_rect_for_tile_priority_empty,
28 const gfx::Transform& transform_for_tile_priority, 30 const gfx::Transform& transform_for_tile_priority,
29 bool offscreen_pre_raster, 31 bool offscreen_pre_raster,
30 bool is_layer); 32 bool is_layer);
31 ~ChildFrame(); 33 ~ChildFrame();
32 34
33 const uint32_t output_surface_id; 35 const uint32_t output_surface_id;
34 std::unique_ptr<cc::CompositorFrame> frame; 36 base::Optional<cc::CompositorFrame> frame;
35 // The id of the compositor this |frame| comes from. 37 // The id of the compositor this |frame| comes from.
36 const CompositorID compositor_id; 38 const CompositorID compositor_id;
37 const bool viewport_rect_for_tile_priority_empty; 39 const bool viewport_rect_for_tile_priority_empty;
38 const gfx::Transform transform_for_tile_priority; 40 const gfx::Transform transform_for_tile_priority;
39 const bool offscreen_pre_raster; 41 const bool offscreen_pre_raster;
40 const bool is_layer; 42 const bool is_layer;
41 43
42 private: 44 private:
43 DISALLOW_COPY_AND_ASSIGN(ChildFrame); 45 DISALLOW_COPY_AND_ASSIGN(ChildFrame);
44 }; 46 };
45 47
46 } // namespace webview 48 } // namespace webview
47 49
48 #endif // ANDROID_WEBVIEW_BROWSER_CHILD_FRAME_H_ 50 #endif // ANDROID_WEBVIEW_BROWSER_CHILD_FRAME_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698