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

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

Issue 23171014: Fix UpdateTilePriorities viewport in Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to 221292 Created 7 years, 3 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"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "cc/output/output_surface.h" 12 #include "cc/output/output_surface.h"
13 #include "content/public/browser/android/synchronous_compositor.h" 13 #include "content/public/browser/android/synchronous_compositor.h"
14 #include "ui/gfx/transform.h"
14 15
15 namespace cc { 16 namespace cc {
16 class ContextProvider; 17 class ContextProvider;
17 class CompositorFrameMetadata; 18 class CompositorFrameMetadata;
18 } 19 }
19 20
20 namespace content { 21 namespace content {
21 22
22 class SynchronousCompositorClient; 23 class SynchronousCompositorClient;
23 class SynchronousCompositorOutputSurface; 24 class SynchronousCompositorOutputSurface;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; 61 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE;
61 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE; 62 virtual void SwapBuffers(cc::CompositorFrame* frame) OVERRIDE;
62 63
63 // Partial SynchronousCompositor API implementation. 64 // Partial SynchronousCompositor API implementation.
64 bool InitializeHwDraw( 65 bool InitializeHwDraw(
65 scoped_refptr<gfx::GLSurface> surface, 66 scoped_refptr<gfx::GLSurface> surface,
66 scoped_refptr<cc::ContextProvider> offscreen_context_provider); 67 scoped_refptr<cc::ContextProvider> offscreen_context_provider);
67 void ReleaseHwDraw(); 68 void ReleaseHwDraw();
68 bool DemandDrawHw(gfx::Size surface_size, 69 bool DemandDrawHw(gfx::Size surface_size,
69 const gfx::Transform& transform, 70 const gfx::Transform& transform,
71 gfx::Rect viewport,
70 gfx::Rect clip, 72 gfx::Rect clip,
71 bool stencil_enabled); 73 bool stencil_enabled);
72 bool DemandDrawSw(SkCanvas* canvas); 74 bool DemandDrawSw(SkCanvas* canvas);
73 75
74 private: 76 private:
75 class SoftwareDevice; 77 class SoftwareDevice;
76 friend class SoftwareDevice; 78 friend class SoftwareDevice;
77 79
78 // Private OutputSurface overrides. 80 // Private OutputSurface overrides.
79 virtual void PostCheckForRetroactiveBeginFrame() OVERRIDE; 81 virtual void PostCheckForRetroactiveBeginFrame() OVERRIDE;
80 82
81 void InvokeComposite(gfx::Size damage_size); 83 void InvokeComposite(const gfx::Transform& transform,
84 gfx::Rect viewport,
85 gfx::Rect clip,
86 bool valid_for_tile_management);
82 bool CalledOnValidThread() const; 87 bool CalledOnValidThread() const;
83 SynchronousCompositorOutputSurfaceDelegate* GetDelegate(); 88 SynchronousCompositorOutputSurfaceDelegate* GetDelegate();
84 89
85 int routing_id_; 90 int routing_id_;
86 bool needs_begin_frame_; 91 bool needs_begin_frame_;
87 bool invoking_composite_; 92 bool invoking_composite_;
88 bool did_swap_buffer_; 93 bool did_swap_buffer_;
89 94
95 gfx::Transform cached_hw_transform_;
96 gfx::Rect cached_hw_viewport_;
97 gfx::Rect cached_hw_clip_;
98
90 // Only valid (non-NULL) during a DemandDrawSw() call. 99 // Only valid (non-NULL) during a DemandDrawSw() call.
91 SkCanvas* current_sw_canvas_; 100 SkCanvas* current_sw_canvas_;
92 101
93 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); 102 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface);
94 }; 103 };
95 104
96 } // namespace content 105 } // namespace content
97 106
98 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF ACE_H_ 107 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF ACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698