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

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

Issue 15688002: Part 1/3 (compositor) of adding with device scale factor to transport surfaces (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update Android build Created 7 years, 7 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 | « no previous file | cc/output/gl_renderer_unittest.cc » ('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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 310
311 if (ViewportSize().IsEmpty()) 311 if (ViewportSize().IsEmpty())
312 return; 312 return;
313 313
314 TRACE_EVENT0("cc", "GLRenderer::DrawLayers"); 314 TRACE_EVENT0("cc", "GLRenderer::DrawLayers");
315 if (is_viewport_changed_) { 315 if (is_viewport_changed_) {
316 // Only reshape when we know we are going to draw. Otherwise, the reshape 316 // Only reshape when we know we are going to draw. Otherwise, the reshape
317 // can leave the window at the wrong size if we never draw and the proper 317 // can leave the window at the wrong size if we never draw and the proper
318 // viewport size is never set. 318 // viewport size is never set.
319 is_viewport_changed_ = false; 319 is_viewport_changed_ = false;
320 output_surface_->Reshape(gfx::Size(ViewportWidth(), ViewportHeight())); 320 output_surface_->Reshape(gfx::Size(ViewportWidth(), ViewportHeight()),
321 DeviceScaleFactor());
321 } 322 }
322 323
323 MakeContextCurrent(); 324 MakeContextCurrent();
324 325
325 ReinitializeGLState(); 326 ReinitializeGLState();
326 } 327 }
327 328
328 void GLRenderer::DoNoOp() { 329 void GLRenderer::DoNoOp() {
329 GLC(context_, context_->bindFramebuffer(GL_FRAMEBUFFER, 0)); 330 GLC(context_, context_->bindFramebuffer(GL_FRAMEBUFFER, 0));
330 GLC(context_, context_->flush()); 331 GLC(context_, context_->flush());
(...skipping 2577 matching lines...) Expand 10 before | Expand all | Expand 10 after
2908 // The Skia GPU backend requires a stencil buffer. See ReinitializeGrCanvas 2909 // The Skia GPU backend requires a stencil buffer. See ReinitializeGrCanvas
2909 // implementation. 2910 // implementation.
2910 return gr_context_ && context_->getContextAttributes().stencil; 2911 return gr_context_ && context_->getContextAttributes().stencil;
2911 } 2912 }
2912 2913
2913 bool GLRenderer::IsContextLost() { 2914 bool GLRenderer::IsContextLost() {
2914 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR); 2915 return (context_->getGraphicsResetStatusARB() != GL_NO_ERROR);
2915 } 2916 }
2916 2917
2917 } // namespace cc 2918 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/gl_renderer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698