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

Side by Side Diff: cc/output/output_surface.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 | « cc/output/output_surface.h ('k') | cc/output/renderer.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/output_surface.h" 5 #include "cc/output/output_surface.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 if (has_gl_discard_backbuffer_) 105 if (has_gl_discard_backbuffer_)
106 context3d_->ensureBackbufferCHROMIUM(); 106 context3d_->ensureBackbufferCHROMIUM();
107 } 107 }
108 108
109 void OutputSurface::DiscardBackbuffer() { 109 void OutputSurface::DiscardBackbuffer() {
110 DCHECK(context3d_); 110 DCHECK(context3d_);
111 if (has_gl_discard_backbuffer_) 111 if (has_gl_discard_backbuffer_)
112 context3d_->discardBackbufferCHROMIUM(); 112 context3d_->discardBackbufferCHROMIUM();
113 } 113 }
114 114
115 void OutputSurface::Reshape(gfx::Size size) { 115 void OutputSurface::Reshape(gfx::Size size, float scale_factor) {
116 DCHECK(context3d_); 116 DCHECK(context3d_);
117 context3d_->reshape(size.width(), size.height()); 117 context3d_->reshapeWithScaleFactor(size.width(), size.height(), scale_factor);
118 } 118 }
119 119
120 void OutputSurface::BindFramebuffer() { 120 void OutputSurface::BindFramebuffer() {
121 DCHECK(context3d_); 121 DCHECK(context3d_);
122 context3d_->bindFramebuffer(GL_FRAMEBUFFER, 0); 122 context3d_->bindFramebuffer(GL_FRAMEBUFFER, 0);
123 } 123 }
124 124
125 void OutputSurface::SwapBuffers(const LatencyInfo& latency_info) { 125 void OutputSurface::SwapBuffers(const LatencyInfo& latency_info) {
126 DCHECK(context3d_); 126 DCHECK(context3d_);
127 // Note that currently this has the same effect as SwapBuffers; we should 127 // Note that currently this has the same effect as SwapBuffers; we should
128 // consider exposing a different entry point on WebGraphicsContext3D. 128 // consider exposing a different entry point on WebGraphicsContext3D.
129 context3d_->prepareTexture(); 129 context3d_->prepareTexture();
130 } 130 }
131 131
132 void OutputSurface::PostSubBuffer(gfx::Rect rect, 132 void OutputSurface::PostSubBuffer(gfx::Rect rect,
133 const LatencyInfo& latency_info) { 133 const LatencyInfo& latency_info) {
134 DCHECK(context3d_); 134 DCHECK(context3d_);
135 context3d_->postSubBufferCHROMIUM( 135 context3d_->postSubBufferCHROMIUM(
136 rect.x(), rect.y(), rect.width(), rect.height()); 136 rect.x(), rect.y(), rect.width(), rect.height());
137 } 137 }
138 138
139 } // namespace cc 139 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/output_surface.h ('k') | cc/output/renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698