| OLD | NEW |
| 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 // the OpenGL ES 2.0 API. | 51 // the OpenGL ES 2.0 API. |
| 52 class WebGraphicsContext3D : public WebNonCopyable { | 52 class WebGraphicsContext3D : public WebNonCopyable { |
| 53 public: | 53 public: |
| 54 // Context creation attributes. | 54 // Context creation attributes. |
| 55 struct Attributes { | 55 struct Attributes { |
| 56 bool alpha = true; | 56 bool alpha = true; |
| 57 bool depth = true; | 57 bool depth = true; |
| 58 bool stencil = true; | 58 bool stencil = true; |
| 59 bool antialias = true; | 59 bool antialias = true; |
| 60 bool premultipliedAlpha = true; | 60 bool premultipliedAlpha = true; |
| 61 bool canRecoverFromContextLoss = true; | |
| 62 bool noExtensions = false; | |
| 63 bool shareResources = true; | 61 bool shareResources = true; |
| 64 bool preferDiscreteGPU = false; | 62 bool preferDiscreteGPU = false; |
| 65 bool noAutomaticFlushes = false; | 63 bool noAutomaticFlushes = false; |
| 66 bool failIfMajorPerformanceCaveat = false; | 64 bool failIfMajorPerformanceCaveat = false; |
| 67 bool webGL = false; | |
| 68 unsigned webGLVersion = 0; | 65 unsigned webGLVersion = 0; |
| 69 // FIXME: ideally this would be a WebURL, but it is currently not | 66 // FIXME: ideally this would be a WebURL, but it is currently not |
| 70 // possible to pass a WebURL by value across the WebKit API boundary. | 67 // possible to pass a WebURL by value across the WebKit API boundary. |
| 71 // See https://bugs.webkit.org/show_bug.cgi?id=103793#c13 . | 68 // See https://bugs.webkit.org/show_bug.cgi?id=103793#c13 . |
| 72 WebString topDocumentURL; | 69 WebString topDocumentURL; |
| 73 }; | 70 }; |
| 74 | 71 |
| 75 class WebGraphicsContextLostCallback { | 72 class WebGraphicsContextLostCallback { |
| 76 public: | 73 public: |
| 77 virtual void onContextLost() = 0; | 74 virtual void onContextLost() = 0; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 90 | 87 |
| 91 // This destructor needs to be public so that using classes can destroy inst
ances if initialization fails. | 88 // This destructor needs to be public so that using classes can destroy inst
ances if initialization fails. |
| 92 virtual ~WebGraphicsContext3D() { } | 89 virtual ~WebGraphicsContext3D() { } |
| 93 | 90 |
| 94 virtual void setErrorMessageCallback(WebGraphicsErrorMessageCallback* callba
ck) { } | 91 virtual void setErrorMessageCallback(WebGraphicsErrorMessageCallback* callba
ck) { } |
| 95 }; | 92 }; |
| 96 | 93 |
| 97 } // namespace blink | 94 } // namespace blink |
| 98 | 95 |
| 99 #endif | 96 #endif |
| OLD | NEW |