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

Side by Side Diff: components/bitmap_uploader/bitmap_uploader.cc

Issue 2080513002: Deletes mojo::Callback (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/bitmap_uploader/bitmap_uploader.h" 5 #include "components/bitmap_uploader/bitmap_uploader.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 color_state->color = color_; 165 color_state->color = color_;
166 color_state->force_anti_aliasing_off = false; 166 color_state->force_anti_aliasing_off = false;
167 167
168 quad->solid_color_quad_state = std::move(color_state); 168 quad->solid_color_quad_state = std::move(color_state);
169 pass->quads.push_back(std::move(quad)); 169 pass->quads.push_back(std::move(quad));
170 } 170 }
171 171
172 frame->passes.push_back(std::move(pass)); 172 frame->passes.push_back(std::move(pass));
173 173
174 // TODO(rjkroege, fsamuel): We should throttle frames. 174 // TODO(rjkroege, fsamuel): We should throttle frames.
175 surface_->SubmitCompositorFrame(std::move(frame), mojo::Closure()); 175 surface_->SubmitCompositorFrame(std::move(frame), base::Closure());
176 } 176 }
177 177
178 uint32_t BitmapUploader::BindTextureForSize(const gfx::Size& size) { 178 uint32_t BitmapUploader::BindTextureForSize(const gfx::Size& size) {
179 gpu::gles2::GLES2Interface* gl = gles2_context_->interface(); 179 gpu::gles2::GLES2Interface* gl = gles2_context_->interface();
180 // TODO(jamesr): Recycle textures. 180 // TODO(jamesr): Recycle textures.
181 GLuint texture = 0u; 181 GLuint texture = 0u;
182 gl->GenTextures(1, &texture); 182 gl->GenTextures(1, &texture);
183 gl->BindTexture(GL_TEXTURE_2D, texture); 183 gl->BindTexture(GL_TEXTURE_2D, texture);
184 gl->TexImage2D(GL_TEXTURE_2D, 0, TextureFormat(), size.width(), size.height(), 184 gl->TexImage2D(GL_TEXTURE_2D, 0, TextureFormat(), size.width(), size.height(),
185 0, TextureFormat(), GL_UNSIGNED_BYTE, 0); 185 0, TextureFormat(), GL_UNSIGNED_BYTE, 0);
(...skipping 17 matching lines...) Expand all
203 DCHECK_EQ(1, resource.count); 203 DCHECK_EQ(1, resource.count);
204 gl->WaitSyncTokenCHROMIUM(resource.sync_token.GetConstData()); 204 gl->WaitSyncTokenCHROMIUM(resource.sync_token.GetConstData());
205 uint32_t texture_id = resource_to_texture_id_map_[resource.id]; 205 uint32_t texture_id = resource_to_texture_id_map_[resource.id];
206 DCHECK_NE(0u, texture_id); 206 DCHECK_NE(0u, texture_id);
207 resource_to_texture_id_map_.erase(resource.id); 207 resource_to_texture_id_map_.erase(resource.id);
208 gl->DeleteTextures(1, &texture_id); 208 gl->DeleteTextures(1, &texture_id);
209 } 209 }
210 } 210 }
211 211
212 } // namespace bitmap_uploader 212 } // namespace bitmap_uploader
OLDNEW
« no previous file with comments | « components/arc/obb_mounter/arc_obb_mounter_bridge.cc ('k') | components/filesystem/directory_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698