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

Side by Side Diff: content/public/browser/android/synchronous_compositor.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 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 <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
11 11
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/optional.h"
13 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "cc/output/compositor_frame.h"
14 #include "content/common/content_export.h" 16 #include "content/common/content_export.h"
15 #include "ui/gfx/geometry/rect.h" 17 #include "ui/gfx/geometry/rect.h"
16 #include "ui/gfx/geometry/size.h" 18 #include "ui/gfx/geometry/size.h"
17 19
18 class SkCanvas; 20 class SkCanvas;
19 21
20 namespace cc { 22 namespace cc {
21 class CompositorFrame;
22 class CompositorFrameAck; 23 class CompositorFrameAck;
23 } 24 }
24 25
25 namespace gfx { 26 namespace gfx {
26 class Point; 27 class Point;
27 class ScrollOffset; 28 class ScrollOffset;
28 class Transform; 29 class Transform;
29 }; 30 };
30 31
31 namespace content { 32 namespace content {
(...skipping 13 matching lines...) Expand all
45 46
46 struct Frame { 47 struct Frame {
47 Frame(); 48 Frame();
48 ~Frame(); 49 ~Frame();
49 50
50 // Movable type. 51 // Movable type.
51 Frame(Frame&& rhs); 52 Frame(Frame&& rhs);
52 Frame& operator=(Frame&& rhs); 53 Frame& operator=(Frame&& rhs);
53 54
54 uint32_t output_surface_id; 55 uint32_t output_surface_id;
55 std::unique_ptr<cc::CompositorFrame> frame; 56 base::Optional<cc::CompositorFrame> frame;
56 57
57 private: 58 private:
58 DISALLOW_COPY_AND_ASSIGN(Frame); 59 DISALLOW_COPY_AND_ASSIGN(Frame);
59 }; 60 };
60 61
61 // "On demand" hardware draw. The content is first clipped to |damage_area|, 62 // "On demand" hardware draw. The content is first clipped to |damage_area|,
62 // then transformed through |transform|, and finally clipped to |view_size|. 63 // then transformed through |transform|, and finally clipped to |view_size|.
63 virtual Frame DemandDrawHw( 64 virtual Frame DemandDrawHw(
64 const gfx::Size& surface_size, 65 const gfx::Size& surface_size,
65 const gfx::Transform& transform, 66 const gfx::Transform& transform,
(...skipping 28 matching lines...) Expand all
94 // and if any input animation is active, it should tick now. 95 // and if any input animation is active, it should tick now.
95 virtual void OnComputeScroll(base::TimeTicks animation_time) = 0; 96 virtual void OnComputeScroll(base::TimeTicks animation_time) = 0;
96 97
97 protected: 98 protected:
98 virtual ~SynchronousCompositor() {} 99 virtual ~SynchronousCompositor() {}
99 }; 100 };
100 101
101 } // namespace content 102 } // namespace content
102 103
103 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ 104 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698