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

Side by Side Diff: content/port/browser/render_widget_host_view_port.h

Issue 88033002: Add RGB565 Texture readback support in gl_helper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes done as per review comments (WIP: gl_helper_unittests) Created 6 years, 11 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_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ 5 #ifndef CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_
6 #define CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ 6 #define CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // The rectangle region specified with |src_subrect| is copied from the 171 // The rectangle region specified with |src_subrect| is copied from the
172 // contents, scaled to |dst_size|, and written to |output|. 172 // contents, scaled to |dst_size|, and written to |output|.
173 // |callback| is invoked with true on success, false otherwise. |output| can 173 // |callback| is invoked with true on success, false otherwise. |output| can
174 // be initialized even on failure. 174 // be initialized even on failure.
175 // A smaller region than |src_subrect| may be copied if the underlying surface 175 // A smaller region than |src_subrect| may be copied if the underlying surface
176 // is smaller than |src_subrect|. 176 // is smaller than |src_subrect|.
177 // NOTE: |callback| is called asynchronously. 177 // NOTE: |callback| is called asynchronously.
178 virtual void CopyFromCompositingSurface( 178 virtual void CopyFromCompositingSurface(
179 const gfx::Rect& src_subrect, 179 const gfx::Rect& src_subrect,
180 const gfx::Size& dst_size, 180 const gfx::Size& dst_size,
181 const base::Callback<void(bool, const SkBitmap&)>& callback) = 0; 181 const base::Callback<void(bool, const SkBitmap&)>& callback,
182 bool readback_config_rgb565) = 0;
182 183
183 // Copies a given subset of the compositing surface's content into a YV12 184 // Copies a given subset of the compositing surface's content into a YV12
184 // VideoFrame, and invokes a callback with a success/fail parameter. |target| 185 // VideoFrame, and invokes a callback with a success/fail parameter. |target|
185 // must contain an allocated, YV12 video frame of the intended size. If the 186 // must contain an allocated, YV12 video frame of the intended size. If the
186 // copy rectangle does not match |target|'s size, the copied content will be 187 // copy rectangle does not match |target|'s size, the copied content will be
187 // scaled and letterboxed with black borders. The copy will happen 188 // scaled and letterboxed with black borders. The copy will happen
188 // asynchronously. This operation will fail if there is no available 189 // asynchronously. This operation will fail if there is no available
189 // compositing surface. 190 // compositing surface.
190 virtual void CopyFromCompositingSurfaceToVideoFrame( 191 virtual void CopyFromCompositingSurfaceToVideoFrame(
191 const gfx::Rect& src_subrect, 192 const gfx::Rect& src_subrect,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 346
346 // Returns an HWND that's given as the parent window for windowless Flash to 347 // Returns an HWND that's given as the parent window for windowless Flash to
347 // workaround crbug.com/301548. 348 // workaround crbug.com/301548.
348 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const = 0; 349 virtual gfx::NativeViewId GetParentForWindowlessPlugin() const = 0;
349 #endif 350 #endif
350 }; 351 };
351 352
352 } // namespace content 353 } // namespace content
353 354
354 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_ 355 #endif // CONTENT_PORT_BROWSER_RENDER_WIDGET_HOST_VIEW_PORT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698