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

Side by Side Diff: content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.h

Issue 79123004: Implemented failIfMajorPerformanceCaveat WebGL context creation attribute. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Feedback Created 7 years, 1 month 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 | Annotate | Revision Log
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_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 5 #ifndef CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 6 #define CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 // These are the same error codes as used by EGL. 641 // These are the same error codes as used by EGL.
642 enum Error { 642 enum Error {
643 SUCCESS = 0x3000, 643 SUCCESS = 0x3000,
644 BAD_ATTRIBUTE = 0x3004, 644 BAD_ATTRIBUTE = 0x3004,
645 CONTEXT_LOST = 0x300E 645 CONTEXT_LOST = 0x300E
646 }; 646 };
647 // WebGraphicsContext3DCommandBufferImpl configuration attributes. Those in 647 // WebGraphicsContext3DCommandBufferImpl configuration attributes. Those in
648 // the 16-bit range are the same as used by EGL. Those outside the 16-bit 648 // the 16-bit range are the same as used by EGL. Those outside the 16-bit
649 // range are unique to Chromium. Attributes are matched using a closest fit 649 // range are unique to Chromium. Attributes are matched using a closest fit
650 // algorithm. 650 // algorithm.
651 // To ensure attributes are read by the GPU process changes to this
652 // enum should also be copied to gpu/command_buffer/common/gles2_cmd_utils.cc.
651 enum Attribute { 653 enum Attribute {
652 ALPHA_SIZE = 0x3021, 654 ALPHA_SIZE = 0x3021,
653 BLUE_SIZE = 0x3022, 655 BLUE_SIZE = 0x3022,
654 GREEN_SIZE = 0x3023, 656 GREEN_SIZE = 0x3023,
655 RED_SIZE = 0x3024, 657 RED_SIZE = 0x3024,
656 DEPTH_SIZE = 0x3025, 658 DEPTH_SIZE = 0x3025,
657 STENCIL_SIZE = 0x3026, 659 STENCIL_SIZE = 0x3026,
658 SAMPLES = 0x3031, 660 SAMPLES = 0x3031,
659 SAMPLE_BUFFERS = 0x3032, 661 SAMPLE_BUFFERS = 0x3032,
660 HEIGHT = 0x3056, 662 HEIGHT = 0x3056,
661 WIDTH = 0x3057, 663 WIDTH = 0x3057,
662 NONE = 0x3038, // Attrib list = terminator 664 NONE = 0x3038, // Attrib list = terminator
663 SHARE_RESOURCES = 0x10000, 665 SHARE_RESOURCES = 0x10000,
664 BIND_GENERATES_RESOURCES = 0x10001 666 BIND_GENERATES_RESOURCES = 0x10001,
667 FAIL_IF_MAJOR_PERF_CAVEAT = 0x10002
665 }; 668 };
666 friend class WebGraphicsContext3DErrorMessageCallback; 669 friend class WebGraphicsContext3DErrorMessageCallback;
667 670
668 // Initialize the underlying GL context. May be called multiple times; second 671 // Initialize the underlying GL context. May be called multiple times; second
669 // and subsequent calls are ignored. Must be called from the thread that is 672 // and subsequent calls are ignored. Must be called from the thread that is
670 // going to use this object to issue GL commands (which might not be the main 673 // going to use this object to issue GL commands (which might not be the main
671 // thread). 674 // thread).
672 bool MaybeInitializeGL(); 675 bool MaybeInitializeGL();
673 676
674 bool InitializeCommandBuffer(bool onscreen); 677 bool InitializeCommandBuffer(bool onscreen);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 bool bind_generates_resources_; 739 bool bind_generates_resources_;
737 bool use_echo_for_swap_ack_; 740 bool use_echo_for_swap_ack_;
738 SharedMemoryLimits mem_limits_; 741 SharedMemoryLimits mem_limits_;
739 742
740 uint32_t flush_id_; 743 uint32_t flush_id_;
741 }; 744 };
742 745
743 } // namespace content 746 } // namespace content
744 747
745 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_ 748 #endif // CONTENT_COMMON_GPU_CLIENT_WEBGRAPHICSCONTEXT3D_COMMAND_BUFFER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698