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

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 device_rect_for_tiling);
71 void ReturnResources(const cc::CompositorFrameAck& frame_ack); 73 void ReturnResources(const cc::CompositorFrameAck& frame_ack);
72 scoped_ptr<cc::CompositorFrame> DemandDrawSw(SkCanvas* canvas); 74 scoped_ptr<cc::CompositorFrame> DemandDrawSw(SkCanvas* canvas);
73 void SetMemoryPolicy(const SynchronousCompositorMemoryPolicy& policy); 75 void SetMemoryPolicy(const SynchronousCompositorMemoryPolicy& policy);
74 76
75 private: 77 private:
76 class SoftwareDevice; 78 class SoftwareDevice;
77 friend class SoftwareDevice; 79 friend class SoftwareDevice;
78 80
79 void InvokeComposite(const gfx::Transform& transform, 81 void InvokeComposite(const gfx::Transform& transform,
80 gfx::Rect viewport, 82 gfx::Rect viewport,
81 gfx::Rect clip, 83 gfx::Rect clip,
84 gfx::Rect device_rect_for_tiling,
82 bool hardware_draw); 85 bool hardware_draw);
83 bool CalledOnValidThread() const; 86 bool CalledOnValidThread() const;
84 SynchronousCompositorOutputSurfaceDelegate* GetDelegate(); 87 SynchronousCompositorOutputSurfaceDelegate* GetDelegate();
85 88
86 int routing_id_; 89 int routing_id_;
87 bool needs_begin_frame_; 90 bool needs_begin_frame_;
88 bool invoking_composite_; 91 bool invoking_composite_;
89 92
90 gfx::Transform cached_hw_transform_; 93 gfx::Transform cached_hw_transform_;
91 gfx::Rect cached_hw_viewport_; 94 gfx::Rect cached_hw_viewport_;
92 gfx::Rect cached_hw_clip_; 95 gfx::Rect cached_hw_clip_;
96 gfx::Rect cached_hw_device_rect_for_tiling_;
93 97
94 // Only valid (non-NULL) during a DemandDrawSw() call. 98 // Only valid (non-NULL) during a DemandDrawSw() call.
95 SkCanvas* current_sw_canvas_; 99 SkCanvas* current_sw_canvas_;
96 100
97 cc::ManagedMemoryPolicy memory_policy_; 101 cc::ManagedMemoryPolicy memory_policy_;
98 102
99 cc::OutputSurfaceClient* output_surface_client_; 103 cc::OutputSurfaceClient* output_surface_client_;
100 scoped_ptr<cc::CompositorFrame> frame_holder_; 104 scoped_ptr<cc::CompositorFrame> frame_holder_;
101 105
102 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); 106 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface);
103 }; 107 };
104 108
105 } // namespace content 109 } // namespace content
106 110
107 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF ACE_H_ 111 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF ACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698