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

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

Issue 1832263002: Remove WGC3D typedefs and move WebGraphicsInfo to Platform. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: webgraphicsinfo: rebase Created 4 years, 8 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 /* 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 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 virtual void removeTraceLogEnabledStateObserver(TraceLogEnabledStateObserver *) {} 448 virtual void removeTraceLogEnabledStateObserver(TraceLogEnabledStateObserver *) {}
449 449
450 typedef uint64_t WebMemoryAllocatorDumpGuid; 450 typedef uint64_t WebMemoryAllocatorDumpGuid;
451 451
452 // Returns guid corresponding to the given string (the hash value) for 452 // Returns guid corresponding to the given string (the hash value) for
453 // creating a WebMemoryAllocatorDump. 453 // creating a WebMemoryAllocatorDump.
454 virtual WebMemoryAllocatorDumpGuid createWebMemoryAllocatorDumpGuid(const We bString& guidStr) { return 0; } 454 virtual WebMemoryAllocatorDumpGuid createWebMemoryAllocatorDumpGuid(const We bString& guidStr) { return 0; }
455 455
456 // GPU ---------------------------------------------------------------- 456 // GPU ----------------------------------------------------------------
457 // 457 //
458 struct GraphicsInfo {
459 unsigned vendorId = 0;
460 unsigned deviceId = 0;
461 unsigned processCrashCount = 0;
462 unsigned resetNotificationStrategy = 0;
463 bool sandboxed = false;
464 bool testFailContext = false;
465 bool amdSwitchable = false;
466 bool optimus = false;
467 WebString vendorInfo;
468 WebString rendererInfo;
469 WebString driverVersion;
470 WebString errorMessage;
471 };
458 // Returns a newly allocated and initialized offscreen context provider, 472 // Returns a newly allocated and initialized offscreen context provider,
459 // backed by an independent context. Returns null if the context cannot be 473 // backed by an independent context. Returns null if the context cannot be
460 // created or initialized. 474 // created or initialized.
461 // Passing an existing provider to shareContext will create the new context 475 // Passing an existing provider to shareContext will create the new context
462 // in the same share group as the one passed. 476 // in the same share group as the one passed.
463 virtual WebGraphicsContext3DProvider* createOffscreenGraphicsContext3DProvid er(const WebGraphicsContext3D::Attributes&, WebGraphicsContext3DProvider* shareC ontext, WebGraphicsContext3D::WebGraphicsInfo* glInfo) { return nullptr; } 477 virtual WebGraphicsContext3DProvider* createOffscreenGraphicsContext3DProvid er(const WebGraphicsContext3D::Attributes&, WebGraphicsContext3DProvider* shareC ontext, GraphicsInfo* glInfo) { return nullptr; }
464 478
465 // Returns a newly allocated and initialized offscreen context provider, 479 // Returns a newly allocated and initialized offscreen context provider,
466 // backed by the process-wide shared main thread context. Returns null if 480 // backed by the process-wide shared main thread context. Returns null if
467 // the context cannot be created or initialized. 481 // the context cannot be created or initialized.
468 virtual WebGraphicsContext3DProvider* createSharedOffscreenGraphicsContext3D Provider() { return nullptr; } 482 virtual WebGraphicsContext3DProvider* createSharedOffscreenGraphicsContext3D Provider() { return nullptr; }
469 483
470 // Returns true if the platform is capable of producing an offscreen context suitable for accelerating 2d canvas. 484 // Returns true if the platform is capable of producing an offscreen context suitable for accelerating 2d canvas.
471 // This will return false if the platform cannot promise that contexts will be preserved across operations like 485 // This will return false if the platform cannot promise that contexts will be preserved across operations like
472 // locking the screen or if the platform cannot provide a context with suita ble performance characteristics. 486 // locking the screen or if the platform cannot provide a context with suita ble performance characteristics.
473 // 487 //
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 protected: 633 protected:
620 Platform(); 634 Platform();
621 virtual ~Platform() { } 635 virtual ~Platform() { }
622 636
623 WebThread* m_mainThread; 637 WebThread* m_mainThread;
624 }; 638 };
625 639
626 } // namespace blink 640 } // namespace blink
627 641
628 #endif 642 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698