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

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

Issue 15579002: Implement transform/clip support for Android WebView. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Turn on fuzzy comparator for new SoftwareRenderer tests Created 7 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_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/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE; 48 virtual bool ForcedDrawToSoftwareDevice() const OVERRIDE;
49 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE; 49 virtual bool BindToClient(cc::OutputSurfaceClient* surface_client) OVERRIDE;
50 virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE; 50 virtual void Reshape(gfx::Size size, float scale_factor) OVERRIDE;
51 virtual void SendFrameToParentCompositor(cc::CompositorFrame* frame) OVERRIDE; 51 virtual void SendFrameToParentCompositor(cc::CompositorFrame* frame) OVERRIDE;
52 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE; 52 virtual void SetNeedsBeginFrame(bool enable) OVERRIDE;
53 virtual void SwapBuffers(const ui::LatencyInfo& info) OVERRIDE; 53 virtual void SwapBuffers(const ui::LatencyInfo& info) OVERRIDE;
54 54
55 // Partial SynchronousCompositor API implementation. 55 // Partial SynchronousCompositor API implementation.
56 bool IsHwReady(); 56 bool IsHwReady();
57 bool DemandDrawSw(SkCanvas* canvas); 57 bool DemandDrawSw(SkCanvas* canvas);
58 bool DemandDrawHw(gfx::Size view_size, 58 bool DemandDrawHw(gfx::Size surface_size,
59 const gfx::Transform& transform, 59 const gfx::Transform& transform,
60 gfx::Rect clip); 60 gfx::Rect clip);
61 61
62 private: 62 private:
63 class SoftwareDevice; 63 class SoftwareDevice;
64 friend class SoftwareDevice; 64 friend class SoftwareDevice;
65 65
66 void InvokeComposite(const gfx::Transform& transform, gfx::Rect damage_area); 66 void InvokeComposite(gfx::Size damage_size);
67 void UpdateCompositorClientSettings(); 67 void UpdateCompositorClientSettings();
68 void NotifyCompositorSettingsChanged(); 68 void NotifyCompositorSettingsChanged();
69 bool CalledOnValidThread() const; 69 bool CalledOnValidThread() const;
70 SynchronousCompositorOutputSurfaceDelegate* GetDelegate(); 70 SynchronousCompositorOutputSurfaceDelegate* GetDelegate();
71 71
72 int routing_id_; 72 int routing_id_;
73 bool needs_begin_frame_; 73 bool needs_begin_frame_;
74 bool did_swap_buffer_; 74 bool did_swap_buffer_;
75 75
76 // Only valid (non-NULL) during a DemandDrawSw() call. 76 // Only valid (non-NULL) during a DemandDrawSw() call.
77 SkCanvas* current_sw_canvas_; 77 SkCanvas* current_sw_canvas_;
78 78
79 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface); 79 DISALLOW_COPY_AND_ASSIGN(SynchronousCompositorOutputSurface);
80 }; 80 };
81 81
82 } // namespace content 82 } // namespace content
83 83
84 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF ACE_H_ 84 #endif // CONTENT_BROWSER_ANDROID_IN_PROCESS_SYNCHRONOUS_COMPOSITOR_OUTPUT_SURF ACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698