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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_mac.h

Issue 1129883003: Pass Surface ID namespace to renderer compositors. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improved the way the surface id is passed to renderer Created 5 years, 7 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #include <IOSurface/IOSurfaceAPI.h> 9 #include <IOSurface/IOSurfaceAPI.h>
10 #include <list> 10 #include <list>
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 bool HasAcceleratedSurface(const gfx::Size& desired_size) override; 338 bool HasAcceleratedSurface(const gfx::Size& desired_size) override;
339 void GetScreenInfo(blink::WebScreenInfo* results) override; 339 void GetScreenInfo(blink::WebScreenInfo* results) override;
340 gfx::Rect GetBoundsInRootWindow() override; 340 gfx::Rect GetBoundsInRootWindow() override;
341 gfx::GLSurfaceHandle GetCompositingSurface() override; 341 gfx::GLSurfaceHandle GetCompositingSurface() override;
342 342
343 bool LockMouse() override; 343 bool LockMouse() override;
344 void UnlockMouse() override; 344 void UnlockMouse() override;
345 void WheelEventAck(const blink::WebMouseWheelEvent& event, 345 void WheelEventAck(const blink::WebMouseWheelEvent& event,
346 InputEventAckState ack_result) override; 346 InputEventAckState ack_result) override;
347 347
348 uint32_t GetSurfaceIdNamespace() override;
349
348 // IPC::Sender implementation. 350 // IPC::Sender implementation.
349 bool Send(IPC::Message* message) override; 351 bool Send(IPC::Message* message) override;
350 352
351 SkColorType PreferredReadbackFormat() override; 353 SkColorType PreferredReadbackFormat() override;
352 354
353 // gfx::DisplayObserver implementation. 355 // gfx::DisplayObserver implementation.
354 void OnDisplayAdded(const gfx::Display& new_display) override; 356 void OnDisplayAdded(const gfx::Display& new_display) override;
355 void OnDisplayRemoved(const gfx::Display& old_display) override; 357 void OnDisplayRemoved(const gfx::Display& old_display) override;
356 void OnDisplayMetricsChanged(const gfx::Display& display, 358 void OnDisplayMetricsChanged(const gfx::Display& display,
357 uint32_t metrics) override; 359 uint32_t metrics) override;
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 // - |browser_compositor_| has been destroyed and 435 // - |browser_compositor_| has been destroyed and
434 // |delegated_frame_host_| has been hidden. 436 // |delegated_frame_host_| has been hidden.
435 // Happens when: 437 // Happens when:
436 // - The |render_widget_host_| is hidden or dead, and |cocoa_view_| is not 438 // - The |render_widget_host_| is hidden or dead, and |cocoa_view_| is not
437 // attached to a NSWindow. 439 // attached to a NSWindow.
438 // - This happens for backgrounded tabs. 440 // - This happens for backgrounded tabs.
439 BrowserCompositorDestroyed, 441 BrowserCompositorDestroyed,
440 }; 442 };
441 BrowserCompositorViewState browser_compositor_state_; 443 BrowserCompositorViewState browser_compositor_state_;
442 444
443 // Delegated frame management and compositior. 445 // Delegated frame management and compositor.
444 scoped_ptr<DelegatedFrameHost> delegated_frame_host_; 446 scoped_ptr<DelegatedFrameHost> delegated_frame_host_;
445 scoped_ptr<ui::Layer> root_layer_; 447 scoped_ptr<ui::Layer> root_layer_;
446 448
447 // Container for ui::Compositor the CALayer tree drawn by it. 449 // Container for ui::Compositor the CALayer tree drawn by it.
448 scoped_ptr<BrowserCompositorMac> browser_compositor_; 450 scoped_ptr<BrowserCompositorMac> browser_compositor_;
449 451
450 // Placeholder that is allocated while browser_compositor_ is NULL, 452 // Placeholder that is allocated while browser_compositor_ is NULL,
451 // indicating that a BrowserCompositorViewMac may be allocated. This is to 453 // indicating that a BrowserCompositorViewMac may be allocated. This is to
452 // help in recycling the internals of BrowserCompositorViewMac. 454 // help in recycling the internals of BrowserCompositorViewMac.
453 scoped_ptr<BrowserCompositorMacPlaceholder> 455 scoped_ptr<BrowserCompositorMacPlaceholder>
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
587 589
588 // Factory used to safely scope delayed calls to ShutdownHost(). 590 // Factory used to safely scope delayed calls to ShutdownHost().
589 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_; 591 base::WeakPtrFactory<RenderWidgetHostViewMac> weak_factory_;
590 592
591 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 593 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
592 }; 594 };
593 595
594 } // namespace content 596 } // namespace content
595 597
596 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 598 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698