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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.h

Issue 209903002: Revert of aura: Remove old GL paths from RenderWidgetHostViewAura. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.h
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
index 83eeb60615c776538b335fed870e678b511ede29..bc2ad37a2f858a18c073c158fe2d2c3e3c8ef49d 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.h
+++ b/content/browser/renderer_host/render_widget_host_view_aura.h
@@ -367,9 +367,7 @@
// Exposed for tests.
aura::Window* window() { return window_; }
- gfx::Size current_frame_size_in_dip() const {
- return current_frame_size_in_dip_;
- }
+ gfx::Size current_frame_size() const { return current_frame_size_; }
void LockResources();
void UnlockResources();
@@ -439,6 +437,7 @@
// Checks if the resize lock can be released because we received an new frame.
void CheckResizeLock();
+ void UpdateExternalTexture();
ui::InputMethod* GetInputMethod() const;
// Returns whether the widget needs an input grab to work properly.
@@ -529,6 +528,28 @@
// Converts |rect| from screen coordinate to window coordinate.
gfx::Rect ConvertRectFromScreen(const gfx::Rect& rect) const;
+ typedef base::Callback<void(bool, const scoped_refptr<ui::Texture>&)>
+ BufferPresentedCallback;
+
+ // The common entry point for buffer updates from renderer
+ // and GPU process.
+ void BuffersSwapped(const gfx::Size& surface_size,
+ const gfx::Rect& damage_rect,
+ float surface_scale_factor,
+ const gpu::Mailbox& mailbox,
+ const std::vector<ui::LatencyInfo>& latency_info,
+ const BufferPresentedCallback& ack_callback);
+
+ bool SwapBuffersPrepare(const gfx::Rect& surface_rect,
+ float surface_scale_factor,
+ const gfx::Rect& damage_rect,
+ const gpu::Mailbox& mailbox,
+ const BufferPresentedCallback& ack_callback);
+
+ void SwapBuffersCompleted(
+ const BufferPresentedCallback& ack_callback,
+ const scoped_refptr<ui::Texture>& texture_to_return);
+
void SwapDelegatedFrame(
uint32 output_surface_id,
scoped_ptr<cc::DelegatedFrameData> frame_data,
@@ -620,6 +641,9 @@
std::vector<base::Closure> on_compositing_did_commit_callbacks_;
+ // The current frontbuffer texture.
+ scoped_refptr<ui::Texture> current_surface_;
+
// This holds the current software framebuffer, if any.
scoped_ptr<SoftwareFrameManager> software_frame_manager_;
@@ -635,6 +659,12 @@
// returns until the acks are sent.
int pending_delegated_ack_count_;
+ // The damage in the previously presented buffer.
+ SkRegion previous_damage_;
+
+ // Pending damage from previous frames that we skipped.
+ SkRegion skipped_damage_;
+
// True after a delegated frame has been skipped, until a frame is not
// skipped.
bool skipped_frames_;
@@ -647,9 +677,11 @@
// Provides delegated frame updates to the cc::DelegatedRendererLayer.
scoped_refptr<cc::DelegatedFrameProvider> frame_provider_;
- // The size and scale of the last software compositing frame that was swapped.
- gfx::Size last_swapped_software_frame_size_;
- float last_swapped_software_frame_scale_factor_;
+ // The size of the last frame that was swapped (even if we skipped it).
+ // Used to determine when the skipped_damage_ needs to be reset due to
+ // size changes between front- and backbuffer.
+ gfx::Size last_swapped_surface_size_;
+ float last_swapped_surface_scale_factor_;
// If non-NULL we're in OnPaint() and this is the supplied canvas.
gfx::Canvas* paint_canvas_;
@@ -669,6 +701,11 @@
// events vs. normal mouse move events.
bool synthetic_move_sent_;
+ // Signals that the accelerated compositing has been turned on or off.
+ // This is used to signal to turn off the external texture as soon as the
+ // software backing store is updated.
+ bool accelerated_compositing_state_changed_;
+
// This lock is the one waiting for a frame of the right size to come back
// from the renderer/GPU process. It is set from the moment the aura window
// got resized, to the moment we committed the renderer frame of the same
@@ -678,7 +715,7 @@
scoped_ptr<ResizeLock> resize_lock_;
// Keeps track of the current frame size.
- gfx::Size current_frame_size_in_dip_;
+ gfx::Size current_frame_size_;
// This lock is for waiting for a front surface to become available to draw.
scoped_refptr<ui::CompositorLock> released_front_lock_;
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698