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

Side by Side Diff: cc/output/gl_renderer.cc

Issue 16069004: cc: Remove legacy accelerated painting path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unused variable warning Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/output/delegating_renderer.cc ('k') | cc/resources/resource_update.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 #include "cc/output/gl_renderer.h" 5 #include "cc/output/gl_renderer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 148
149 context_->pushGroupMarkerEXT("CompositorContext"); 149 context_->pushGroupMarkerEXT("CompositorContext");
150 150
151 std::string extensions_string = 151 std::string extensions_string =
152 UTF16ToASCII(context_->getString(GL_EXTENSIONS)); 152 UTF16ToASCII(context_->getString(GL_EXTENSIONS));
153 std::vector<std::string> extensions_list; 153 std::vector<std::string> extensions_list;
154 base::SplitString(extensions_string, ' ', &extensions_list); 154 base::SplitString(extensions_string, ' ', &extensions_list);
155 std::set<std::string> extensions(extensions_list.begin(), 155 std::set<std::string> extensions(extensions_list.begin(),
156 extensions_list.end()); 156 extensions_list.end());
157 157
158 if (Settings().accelerate_painting &&
159 extensions.count("GL_EXT_texture_format_BGRA8888") &&
160 extensions.count("GL_EXT_read_format_bgra"))
161 capabilities_.using_accelerated_painting = true;
162 else
163 capabilities_.using_accelerated_painting = false;
164
165 capabilities_.using_partial_swap = 158 capabilities_.using_partial_swap =
166 Settings().partial_swap_enabled && 159 Settings().partial_swap_enabled &&
167 extensions.count("GL_CHROMIUM_post_sub_buffer"); 160 extensions.count("GL_CHROMIUM_post_sub_buffer");
168 161
169 // Use the SwapBuffers callback only with the threaded proxy. 162 // Use the SwapBuffers callback only with the threaded proxy.
170 if (client_->HasImplThread()) 163 if (client_->HasImplThread())
171 capabilities_.using_swap_complete_callback = 164 capabilities_.using_swap_complete_callback =
172 extensions.count("GL_CHROMIUM_swapbuffers_complete_callback") > 0; 165 extensions.count("GL_CHROMIUM_swapbuffers_complete_callback") > 0;
173 166
174 capabilities_.using_set_visibility = 167 capabilities_.using_set_visibility =
(...skipping 2736 matching lines...) Expand 10 before | Expand all | Expand 10 after
2911 // The Skia GPU backend requires a stencil buffer. See ReinitializeGrCanvas 2904 // The Skia GPU backend requires a stencil buffer. See ReinitializeGrCanvas
2912 // implementation. 2905 // implementation.
2913 return gr_context_ && context_->getContextAttributes().stencil; 2906 return gr_context_ && context_->getContextAttributes().stencil;
2914 } 2907 }
2915 2908
2916 bool GLRenderer::IsContextLost() { 2909 bool GLRenderer::IsContextLost() {
2917 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR); 2910 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR);
2918 } 2911 }
2919 2912
2920 } // namespace cc 2913 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/delegating_renderer.cc ('k') | cc/resources/resource_update.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698