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

Side by Side Diff: content/browser/android/in_process/synchronous_compositor_output_surface.h

Issue 394113002: Tiling priorities in Android Webview. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE _H_ 5 #ifndef CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE _H_
6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE _H_ 6 #define CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURFACE _H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // OutputSurface. 57 // OutputSurface.
58 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE; 58 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE;
59 virtual void Reshape(const gfx::Size& size, float scale_factor) OVERRIDE; 59 virtual void Reshape(const gfx::Size& size, float scale_factor) OVERRIDE;
60 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; 60 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE;
61 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; 61 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE;
62 62
63 // Partial SynchronousCompositor API implementation. 63 // Partial SynchronousCompositor API implementation.
64 bool InitializeHwDraw( 64 bool InitializeHwDraw(
65 scoped_refptr<cc::ContextProvider> onscreen_context_provider); 65 scoped_refptr<cc::ContextProvider> onscreen_context_provider);
66 void ReleaseHwDraw(); 66 void ReleaseHwDraw();
67 scoped_ptr<cc::CompositorFrame> DemandDrawHw(gfx::Size surface_size, 67 scoped_ptr<cc::CompositorFrame> DemandDrawHw(
68 const gfx::Transform& transform, 68 gfx::Size surface_size,
69 gfx::Rect viewport, 69 const gfx::Transform& transform,
70 gfx::Rect clip); 70 gfx::Rect viewport,
71 gfx::Rect clip,
72 gfx::Rect external_tiling_rect,
73 gfx::Transform external_tiling_transform);
71 void ReturnResources(const cc::CompositorFrameAck& frame_ack); 74 void ReturnResources(const cc::CompositorFrameAck& frame_ack);
72 scoped_ptr<cc::CompositorFrame> DemandDrawSw(SkCanvas* canvas); 75 scoped_ptr<cc::CompositorFrame> DemandDrawSw(SkCanvas* canvas);
73 void SetMemoryPolicy(const SynchronousCompositorMemoryPolicy& policy); 76 void SetMemoryPolicy(const SynchronousCompositorMemoryPolicy& policy);
74 77
75 private: 78 private:
76 class SoftwareDevice; 79 class SoftwareDevice;
77 friend class SoftwareDevice; 80 friend class SoftwareDevice;
78 81
79 void InvokeComposite(const gfx::Transform& transform, 82 void InvokeComposite(const gfx::Transform& transform,
80 gfx::Rect viewport, 83 gfx::Rect viewport,
81 gfx::Rect clip, 84 gfx::Rect clip,
85 gfx::Rect external_tiling_rect,
86 gfx::Transform external_tiling_transform,
82 bool hardware_draw); 87 bool hardware_draw);
83 bool CalledOnValidThread() const; 88 bool CalledOnValidThread() const;
84 SynchronousCompositorOutputSurfaceDelegate* GetDelegate(); 89 SynchronousCompositorOutputSurfaceDelegate* GetDelegate();
85 90
86 int routing_id_; 91 int routing_id_;
87 bool needs_begin_frame_; 92 bool needs_begin_frame_;
88 bool invoking_composite_; 93 bool invoking_composite_;
89 94
90 gfx::Transform cached_hw_transform_; 95 gfx::Transform cached_hw_transform_;
91 gfx::Rect cached_hw_viewport_; 96 gfx::Rect cached_hw_viewport_;
92 gfx::Rect cached_hw_clip_; 97 gfx::Rect cached_hw_clip_;
98 gfx::Rect cached_hw_external_tiling_rect_;
99 gfx::Transform cached_hw_external_tiling_transform_;
93 100
94 // Only valid (non-NULL) during a DemandDrawSw() call. 101 // Only valid (non-NULL) during a DemandDrawSw() call.
95 SkCanvas* current_sw_canvas_; 102 SkCanvas* current_sw_canvas_;
96 103
97 cc::ManagedMemoryPolicy memory_policy_; 104 cc::ManagedMemoryPolicy memory_policy_;
98 105
99 cc::OutputSurfaceClient* output_surface_client_; 106 cc::OutputSurfaceClient* output_surface_client_;
100 scoped_ptr<cc::CompositorFrame> frame_holder_; 107 scoped_ptr<cc::CompositorFrame> frame_holder_;
101 108
102 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); 109 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface);
103 }; 110 };
104 111
105 } // namespace content 112 } // namespace content
106 113
107 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF ACE_H_ 114 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF ACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698