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

Side by Side Diff: ui/gfx/native_widget_types.h

Issue 12463007: Disable partial swaps for webview guest renderer until we can figure out how to do that properly. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin_compositing_helper.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 UI_GFX_NATIVE_WIDGET_TYPES_H_ 5 #ifndef UI_GFX_NATIVE_WIDGET_TYPES_H_
6 #define UI_GFX_NATIVE_WIDGET_TYPES_H_ 6 #define UI_GFX_NATIVE_WIDGET_TYPES_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(OS_ANDROID) 10 #if defined(OS_ANDROID)
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 // returned to a bool. For now we use a type large enough to hold a 264 // returned to a bool. For now we use a type large enough to hold a
265 // pointer on 64-bit architectures in case we need this capability. 265 // pointer on 64-bit architectures in case we need this capability.
266 typedef uint64 PluginWindowHandle; 266 typedef uint64 PluginWindowHandle;
267 const PluginWindowHandle kNullPluginWindow = 0; 267 const PluginWindowHandle kNullPluginWindow = 0;
268 #endif 268 #endif
269 269
270 enum SurfaceType { 270 enum SurfaceType {
271 EMPTY, 271 EMPTY,
272 NATIVE_DIRECT, 272 NATIVE_DIRECT,
273 NATIVE_TRANSPORT, 273 NATIVE_TRANSPORT,
274 TEXTURE_TRANSPORT 274 TEXTURE_TRANSPORT,
275 TEXTURE_TRANSPORT_NO_PARTIAL_SWAP
piman 2013/03/05 20:32:37 I'm really uneasy with passing feature flags throu
alexst (slow to review) 2013/03/05 21:09:28 I'll need to go do some digging to find a good way
275 }; 276 };
276 277
277 struct GLSurfaceHandle { 278 struct GLSurfaceHandle {
278 GLSurfaceHandle() 279 GLSurfaceHandle()
279 : handle(kNullPluginWindow), 280 : handle(kNullPluginWindow),
280 transport_type(EMPTY), 281 transport_type(EMPTY),
281 parent_gpu_process_id(0), 282 parent_gpu_process_id(0),
282 parent_client_id(0) { 283 parent_client_id(0) {
283 } 284 }
284 GLSurfaceHandle(PluginWindowHandle handle_, SurfaceType transport_) 285 GLSurfaceHandle(PluginWindowHandle handle_, SurfaceType transport_)
285 : handle(handle_), 286 : handle(handle_),
286 transport_type(transport_), 287 transport_type(transport_),
287 parent_gpu_process_id(0), 288 parent_gpu_process_id(0),
288 parent_client_id(0) { 289 parent_client_id(0) {
289 DCHECK(!is_null() || handle == kNullPluginWindow); 290 DCHECK(!is_null() || handle == kNullPluginWindow);
290 DCHECK(transport_type != TEXTURE_TRANSPORT || 291 DCHECK(transport_type != TEXTURE_TRANSPORT ||
292 transport_type != TEXTURE_TRANSPORT_NO_PARTIAL_SWAP ||
291 handle == kNullPluginWindow); 293 handle == kNullPluginWindow);
292 } 294 }
293 bool is_null() const { return transport_type == EMPTY; } 295 bool is_null() const { return transport_type == EMPTY; }
294 bool is_transport() const { 296 bool is_transport() const {
295 return transport_type == NATIVE_TRANSPORT || 297 return transport_type == NATIVE_TRANSPORT ||
296 transport_type == TEXTURE_TRANSPORT; 298 transport_type == TEXTURE_TRANSPORT ||
299 transport_type == TEXTURE_TRANSPORT_NO_PARTIAL_SWAP;
297 } 300 }
298 PluginWindowHandle handle; 301 PluginWindowHandle handle;
299 SurfaceType transport_type; 302 SurfaceType transport_type;
300 int parent_gpu_process_id; 303 int parent_gpu_process_id;
301 uint32 parent_client_id; 304 uint32 parent_client_id;
302 }; 305 };
303 306
304 // AcceleratedWidget provides a surface to compositors to paint pixels. 307 // AcceleratedWidget provides a surface to compositors to paint pixels.
305 #if defined(OS_WIN) 308 #if defined(OS_WIN)
306 typedef HWND AcceleratedWidget; 309 typedef HWND AcceleratedWidget;
(...skipping 10 matching lines...) Expand all
317 #elif defined(OS_ANDROID) 320 #elif defined(OS_ANDROID)
318 typedef ANativeWindow* AcceleratedWidget; 321 typedef ANativeWindow* AcceleratedWidget;
319 const AcceleratedWidget kNullAcceleratedWidget = 0; 322 const AcceleratedWidget kNullAcceleratedWidget = 0;
320 #else 323 #else
321 #error unknown platform 324 #error unknown platform
322 #endif 325 #endif
323 326
324 } // namespace gfx 327 } // namespace gfx
325 328
326 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_ 329 #endif // UI_GFX_NATIVE_WIDGET_TYPES_H_
OLDNEW
« no previous file with comments | « content/renderer/browser_plugin/browser_plugin_compositing_helper.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698