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

Side by Side Diff: third_party/WebKit/public/platform/Platform.h

Issue 1990063004: Move bindToCurrentThread out to the creators of WebGL contexts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bindwebgl: . Created 4 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
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp ('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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 unsigned processCrashCount = 0; 453 unsigned processCrashCount = 0;
454 unsigned resetNotificationStrategy = 0; 454 unsigned resetNotificationStrategy = 0;
455 bool sandboxed = false; 455 bool sandboxed = false;
456 bool amdSwitchable = false; 456 bool amdSwitchable = false;
457 bool optimus = false; 457 bool optimus = false;
458 WebString vendorInfo; 458 WebString vendorInfo;
459 WebString rendererInfo; 459 WebString rendererInfo;
460 WebString driverVersion; 460 WebString driverVersion;
461 WebString errorMessage; 461 WebString errorMessage;
462 }; 462 };
463 enum WillBindToCurrentThread {
464 BindToCurrentThread,
465 DoNotBindToCurrentThread
466 };
467 // Returns a newly allocated and initialized offscreen context provider, 463 // Returns a newly allocated and initialized offscreen context provider,
468 // backed by an independent context. Returns null if the context cannot be 464 // backed by an independent context. Returns null if the context cannot be
469 // created or initialized. 465 // created or initialized.
470 // Passing an existing provider to shareContext will create the new context 466 // Passing an existing provider to shareContext will create the new context
471 // in the same share group as the one passed. 467 // in the same share group as the one passed.
472 virtual WebGraphicsContext3DProvider* createOffscreenGraphicsContext3DProvid er( 468 virtual WebGraphicsContext3DProvider* createOffscreenGraphicsContext3DProvid er(
473 const ContextAttributes&, 469 const ContextAttributes&,
474 const WebURL& topDocumentURL, 470 const WebURL& topDocumentURL,
475 WebGraphicsContext3DProvider* shareContext, 471 WebGraphicsContext3DProvider* shareContext,
476 GraphicsInfo*, 472 GraphicsInfo*) { return nullptr; }
477 WillBindToCurrentThread) { return nullptr; }
478 473
479 // Returns a newly allocated and initialized offscreen context provider, 474 // Returns a newly allocated and initialized offscreen context provider,
480 // backed by the process-wide shared main thread context. Returns null if 475 // backed by the process-wide shared main thread context. Returns null if
481 // the context cannot be created or initialized. 476 // the context cannot be created or initialized.
482 virtual WebGraphicsContext3DProvider* createSharedOffscreenGraphicsContext3D Provider() { return nullptr; } 477 virtual WebGraphicsContext3DProvider* createSharedOffscreenGraphicsContext3D Provider() { return nullptr; }
483 478
484 // Returns true if the platform is capable of producing an offscreen context suitable for accelerating 2d canvas. 479 // Returns true if the platform is capable of producing an offscreen context suitable for accelerating 2d canvas.
485 // This will return false if the platform cannot promise that contexts will be preserved across operations like 480 // This will return false if the platform cannot promise that contexts will be preserved across operations like
486 // locking the screen or if the platform cannot provide a context with suita ble performance characteristics. 481 // locking the screen or if the platform cannot provide a context with suita ble performance characteristics.
487 // 482 //
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 protected: 614 protected:
620 Platform(); 615 Platform();
621 virtual ~Platform() { } 616 virtual ~Platform() { }
622 617
623 WebThread* m_mainThread; 618 WebThread* m_mainThread;
624 }; 619 };
625 620
626 } // namespace blink 621 } // namespace blink
627 622
628 #endif 623 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/webgl/WebGLRenderingContextBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698