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

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

Issue 1417893006: sync compositor: pass simple gfx types by const ref (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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"
(...skipping 30 matching lines...) Expand all
41 // instance as needed, but only if |client| is non-nullptr. 41 // instance as needed, but only if |client| is non-nullptr.
42 static void SetClientForWebContents(WebContents* contents, 42 static void SetClientForWebContents(WebContents* contents,
43 SynchronousCompositorClient* client); 43 SynchronousCompositorClient* client);
44 44
45 static void SetGpuService( 45 static void SetGpuService(
46 scoped_refptr<gpu::InProcessCommandBuffer::Service> service); 46 scoped_refptr<gpu::InProcessCommandBuffer::Service> service);
47 47
48 // "On demand" hardware draw. The content is first clipped to |damage_area|, 48 // "On demand" hardware draw. The content is first clipped to |damage_area|,
49 // then transformed through |transform|, and finally clipped to |view_size|. 49 // then transformed through |transform|, and finally clipped to |view_size|.
50 virtual scoped_ptr<cc::CompositorFrame> DemandDrawHw( 50 virtual scoped_ptr<cc::CompositorFrame> DemandDrawHw(
51 gfx::Size surface_size, 51 const gfx::Size& surface_size,
52 const gfx::Transform& transform, 52 const gfx::Transform& transform,
53 gfx::Rect viewport, 53 const gfx::Rect& viewport,
54 gfx::Rect clip, 54 const gfx::Rect& clip,
55 gfx::Rect viewport_rect_for_tile_priority, 55 const gfx::Rect& viewport_rect_for_tile_priority,
56 const gfx::Transform& transform_for_tile_priority) = 0; 56 const gfx::Transform& transform_for_tile_priority) = 0;
57 57
58 // For delegated rendering, return resources from parent compositor to this. 58 // For delegated rendering, return resources from parent compositor to this.
59 // Note that all resources must be returned before ReleaseHwDraw. 59 // Note that all resources must be returned before ReleaseHwDraw.
60 virtual void ReturnResources(const cc::CompositorFrameAck& frame_ack) = 0; 60 virtual void ReturnResources(const cc::CompositorFrameAck& frame_ack) = 0;
61 61
62 // "On demand" SW draw, into the supplied canvas (observing the transform 62 // "On demand" SW draw, into the supplied canvas (observing the transform
63 // and clip set there-in). 63 // and clip set there-in).
64 virtual bool DemandDrawSw(SkCanvas* canvas) = 0; 64 virtual bool DemandDrawSw(SkCanvas* canvas) = 0;
65 65
(...skipping 14 matching lines...) Expand all
80 // and if any input animation is active, it should tick now. 80 // and if any input animation is active, it should tick now.
81 virtual void OnComputeScroll(base::TimeTicks animation_time) = 0; 81 virtual void OnComputeScroll(base::TimeTicks animation_time) = 0;
82 82
83 protected: 83 protected:
84 virtual ~SynchronousCompositor() {} 84 virtual ~SynchronousCompositor() {}
85 }; 85 };
86 86
87 } // namespace content 87 } // namespace content
88 88
89 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_ 89 #endif // CONTENT_PUBLIC_BROWSER_ANDROID_SYNCHRONOUS_COMPOSITOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698