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

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

Issue 9582003: Support browser side thumbnailing for GPU composited pages on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 8 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 unified diff | Download patch | Annotate | Revision Log
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_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
7 #pragma once 7 #pragma once
8 8
9 #include <deque> 9 #include <deque>
10 #include <string> 10 #include <string>
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // and doesn't put the results into the backing store. 105 // and doesn't put the results into the backing store.
106 virtual void PaintAtSize(TransportDIB::Handle dib_handle, 106 virtual void PaintAtSize(TransportDIB::Handle dib_handle,
107 int tag, 107 int tag,
108 const gfx::Size& page_size, 108 const gfx::Size& page_size,
109 const gfx::Size& desired_size) = 0; 109 const gfx::Size& desired_size) = 0;
110 110
111 // Copies the contents of the backing store into the given (uninitialized) 111 // Copies the contents of the backing store into the given (uninitialized)
112 // PlatformCanvas. Returns true on success, false otherwise. 112 // PlatformCanvas. Returns true on success, false otherwise.
113 virtual bool CopyFromBackingStore(skia::PlatformCanvas* output) = 0; 113 virtual bool CopyFromBackingStore(skia::PlatformCanvas* output) = 0;
114 114
115 // Copies the contents of the compositing surface into the given
116 // (uninitialized) PlatformCanvas if any. Returns true on success, false
117 // otherwise.
118 virtual bool CopyFromCompositingSurface(skia::PlatformCanvas* output) = 0;
119
115 #if defined(TOOLKIT_GTK) 120 #if defined(TOOLKIT_GTK)
116 // Paint the backing store into the target's |dest_rect|. 121 // Paint the backing store into the target's |dest_rect|.
117 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, 122 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect,
118 GdkWindow* target) = 0; 123 GdkWindow* target) = 0;
119 #elif defined(OS_MACOSX) 124 #elif defined(OS_MACOSX)
120 virtual gfx::Size GetBackingStoreSize() = 0; 125 virtual gfx::Size GetBackingStoreSize() = 0;
121 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, 126 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect,
122 CGContextRef target) = 0; 127 CGContextRef target) = 0;
123 #endif 128 #endif
124 129
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 return is_accelerated_compositing_active_; 322 return is_accelerated_compositing_active_;
318 } 323 }
319 324
320 // Notifies the RenderWidgetHost that the View was destroyed. 325 // Notifies the RenderWidgetHost that the View was destroyed.
321 void ViewDestroyed(); 326 void ViewDestroyed();
322 327
323 // Indicates if the page has finished loading. 328 // Indicates if the page has finished loading.
324 void SetIsLoading(bool is_loading); 329 void SetIsLoading(bool is_loading);
325 330
326 virtual bool CopyFromBackingStore(skia::PlatformCanvas* output) OVERRIDE; 331 virtual bool CopyFromBackingStore(skia::PlatformCanvas* output) OVERRIDE;
332 virtual bool CopyFromCompositingSurface(
333 skia::PlatformCanvas* output) OVERRIDE;
327 #if defined(TOOLKIT_GTK) 334 #if defined(TOOLKIT_GTK)
328 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect, 335 virtual bool CopyFromBackingStoreToGtkWindow(const gfx::Rect& dest_rect,
329 GdkWindow* target) OVERRIDE; 336 GdkWindow* target) OVERRIDE;
330 #elif defined(OS_MACOSX) 337 #elif defined(OS_MACOSX)
331 virtual gfx::Size GetBackingStoreSize() OVERRIDE; 338 virtual gfx::Size GetBackingStoreSize() OVERRIDE;
332 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect, 339 virtual bool CopyFromBackingStoreToCGContext(const CGRect& dest_rect,
333 CGContextRef target) OVERRIDE; 340 CGContextRef target) OVERRIDE;
334 #endif 341 #endif
335 virtual void PaintAtSize(TransportDIB::Handle dib_handle, 342 virtual void PaintAtSize(TransportDIB::Handle dib_handle,
336 int tag, 343 int tag,
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 // then touch events are sent to the renderer. Otherwise, the touch events are 904 // then touch events are sent to the renderer. Otherwise, the touch events are
898 // not sent to the renderer. 905 // not sent to the renderer.
899 bool has_touch_handler_; 906 bool has_touch_handler_;
900 907
901 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 908 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
902 909
903 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 910 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
904 }; 911 };
905 912
906 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_ 913 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698