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

Side by Side Diff: gpu/command_buffer/common/gles2_cmd_utils.cc

Issue 2698573002: Support offscreen contexts which own their backing surface (Closed)
Patch Set: Add missing alpha_size setting Created 3 years, 10 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 // 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 // This file is here so other GLES2 related files can have a common set of 5 // This file is here so other GLES2 related files can have a common set of
6 // includes where appropriate. 6 // includes where appropriate.
7 7
8 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 8 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
9 9
10 #include <GLES2/gl2.h> 10 #include <GLES2/gl2.h>
(...skipping 1875 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 red_size(-1), 1886 red_size(-1),
1887 depth_size(-1), 1887 depth_size(-1),
1888 stencil_size(-1), 1888 stencil_size(-1),
1889 samples(-1), 1889 samples(-1),
1890 sample_buffers(-1), 1890 sample_buffers(-1),
1891 buffer_preserved(true), 1891 buffer_preserved(true),
1892 bind_generates_resource(true), 1892 bind_generates_resource(true),
1893 fail_if_major_perf_caveat(false), 1893 fail_if_major_perf_caveat(false),
1894 lose_context_when_out_of_memory(false), 1894 lose_context_when_out_of_memory(false),
1895 should_use_native_gmb_for_backbuffer(false), 1895 should_use_native_gmb_for_backbuffer(false),
1896 own_offscreen_surface(false),
1896 context_type(CONTEXT_TYPE_OPENGLES2) {} 1897 context_type(CONTEXT_TYPE_OPENGLES2) {}
1897 1898
1898 ContextCreationAttribHelper::ContextCreationAttribHelper( 1899 ContextCreationAttribHelper::ContextCreationAttribHelper(
1899 const ContextCreationAttribHelper& other) = default; 1900 const ContextCreationAttribHelper& other) = default;
1900 1901
1901 bool ContextCreationAttribHelper::Parse(const std::vector<int32_t>& attribs) { 1902 bool ContextCreationAttribHelper::Parse(const std::vector<int32_t>& attribs) {
1902 for (size_t i = 0; i < attribs.size(); i += 2) { 1903 for (size_t i = 0; i < attribs.size(); i += 2) {
1903 const int32_t attrib = attribs[i]; 1904 const int32_t attrib = attribs[i];
1904 if (i + 1 >= attribs.size()) { 1905 if (i + 1 >= attribs.size()) {
1905 if (attrib == kNone) { 1906 if (attrib == kNone) {
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
1964 } 1965 }
1965 } 1966 }
1966 1967
1967 return true; 1968 return true;
1968 } 1969 }
1969 1970
1970 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" 1971 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h"
1971 1972
1972 } // namespace gles2 1973 } // namespace gles2
1973 } // namespace gpu 1974 } // namespace gpu
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698