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

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

Issue 2461803002: Enable creation of offscreen contexts which own their backing surface. (Closed)
Patch Set: Drop unnecessary dependent patch Created 4 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
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 1855 matching lines...) Expand 10 before | Expand all | Expand 10 after
1866 red_size(-1), 1866 red_size(-1),
1867 depth_size(-1), 1867 depth_size(-1),
1868 stencil_size(-1), 1868 stencil_size(-1),
1869 samples(-1), 1869 samples(-1),
1870 sample_buffers(-1), 1870 sample_buffers(-1),
1871 buffer_preserved(true), 1871 buffer_preserved(true),
1872 bind_generates_resource(true), 1872 bind_generates_resource(true),
1873 fail_if_major_perf_caveat(false), 1873 fail_if_major_perf_caveat(false),
1874 lose_context_when_out_of_memory(false), 1874 lose_context_when_out_of_memory(false),
1875 should_use_native_gmb_for_backbuffer(false), 1875 should_use_native_gmb_for_backbuffer(false),
1876 own_offscreen_surface(false),
1876 context_type(CONTEXT_TYPE_OPENGLES2) {} 1877 context_type(CONTEXT_TYPE_OPENGLES2) {}
1877 1878
1878 ContextCreationAttribHelper::ContextCreationAttribHelper( 1879 ContextCreationAttribHelper::ContextCreationAttribHelper(
1879 const ContextCreationAttribHelper& other) = default; 1880 const ContextCreationAttribHelper& other) = default;
1880 1881
1881 bool ContextCreationAttribHelper::Parse(const std::vector<int32_t>& attribs) { 1882 bool ContextCreationAttribHelper::Parse(const std::vector<int32_t>& attribs) {
1882 for (size_t i = 0; i < attribs.size(); i += 2) { 1883 for (size_t i = 0; i < attribs.size(); i += 2) {
1883 const int32_t attrib = attribs[i]; 1884 const int32_t attrib = attribs[i];
1884 if (i + 1 >= attribs.size()) { 1885 if (i + 1 >= attribs.size()) {
1885 if (attrib == kNone) { 1886 if (attrib == kNone) {
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
1945 } 1946 }
1946 1947
1947 return true; 1948 return true;
1948 } 1949 }
1949 1950
1950 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h" 1951 #include "gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h"
1951 1952
1952 } // namespace gles2 1953 } // namespace gles2
1953 } // namespace gpu 1954 } // namespace gpu
1954 1955
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698