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

Side by Side Diff: content/renderer/gpu/mailbox_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
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 #include "content/renderer/gpu/mailbox_output_surface.h" 5 #include "content/renderer/gpu/mailbox_output_surface.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "cc/output/compositor_frame.h" 8 #include "cc/output/compositor_frame.h"
9 #include "cc/output/compositor_frame_ack.h" 9 #include "cc/output/compositor_frame_ack.h"
10 #include "cc/output/gl_frame_data.h" 10 #include "cc/output/gl_frame_data.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 returned_textures_.pop(); 106 returned_textures_.pop();
107 } 107 }
108 108
109 if (fbo_) { 109 if (fbo_) {
110 context3d_->bindFramebuffer(GL_FRAMEBUFFER, fbo_); 110 context3d_->bindFramebuffer(GL_FRAMEBUFFER, fbo_);
111 context3d_->deleteFramebuffer(fbo_); 111 context3d_->deleteFramebuffer(fbo_);
112 fbo_ = 0; 112 fbo_ = 0;
113 } 113 }
114 } 114 }
115 115
116 void MailboxOutputSurface::Reshape(gfx::Size size) { 116 void MailboxOutputSurface::Reshape(gfx::Size size, float scale_factor) {
117 if (size == size_) 117 if (size == size_)
118 return; 118 return;
119 119
120 size_ = size; 120 size_ = size;
121 DiscardBackbuffer(); 121 DiscardBackbuffer();
122 EnsureBackbuffer(); 122 EnsureBackbuffer();
123 } 123 }
124 124
125 void MailboxOutputSurface::BindFramebuffer() { 125 void MailboxOutputSurface::BindFramebuffer() {
126 EnsureBackbuffer(); 126 EnsureBackbuffer();
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 context3d_->bindTexture(GL_TEXTURE_2D, frame.texture_id); 217 context3d_->bindTexture(GL_TEXTURE_2D, frame.texture_id);
218 context3d_->consumeTextureCHROMIUM(GL_TEXTURE_2D, frame.mailbox.name); 218 context3d_->consumeTextureCHROMIUM(GL_TEXTURE_2D, frame.mailbox.name);
219 } 219 }
220 220
221 size_t MailboxOutputSurface::GetNumAcksPending() { 221 size_t MailboxOutputSurface::GetNumAcksPending() {
222 DCHECK(pending_textures_.size()); 222 DCHECK(pending_textures_.size());
223 return pending_textures_.size() - 1; 223 return pending_textures_.size() - 1;
224 } 224 }
225 225
226 } // namespace content 226 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/gpu/mailbox_output_surface.h ('k') | webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698