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

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

Issue 23648014: cc: Move TextureMailbox::ReleaseCallback to SingleReleaseCallback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: releasecallback: missingfiles Created 7 years, 3 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 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 2214 matching lines...) Expand 10 before | Expand all | Expand 10 after
2225 context_->deleteTexture(texture_id); 2225 context_->deleteTexture(texture_id);
2226 request->SendEmptyResult(); 2226 request->SendEmptyResult();
2227 return; 2227 return;
2228 } 2228 }
2229 2229
2230 GLC(context_, context_->bindTexture(GL_TEXTURE_2D, texture_id)); 2230 GLC(context_, context_->bindTexture(GL_TEXTURE_2D, texture_id));
2231 GLC(context_, context_->produceTextureCHROMIUM( 2231 GLC(context_, context_->produceTextureCHROMIUM(
2232 GL_TEXTURE_2D, mailbox.name)); 2232 GL_TEXTURE_2D, mailbox.name));
2233 GLC(context_, context_->bindTexture(GL_TEXTURE_2D, 0)); 2233 GLC(context_, context_->bindTexture(GL_TEXTURE_2D, 0));
2234 sync_point = context_->insertSyncPoint(); 2234 sync_point = context_->insertSyncPoint();
2235 scoped_ptr<TextureMailbox> texture_mailbox = make_scoped_ptr( 2235 TextureMailbox texture_mailbox(mailbox, GL_TEXTURE_2D, sync_point);
2236 new TextureMailbox(mailbox, 2236 ScopedReleaseCallback release_callback =
2237 texture_mailbox_deleter_->GetReleaseCallback( 2237 texture_mailbox_deleter_->GetReleaseCallback(
2238 output_surface_->context_provider(), texture_id), 2238 output_surface_->context_provider(), texture_id);
2239 GL_TEXTURE_2D, 2239 request->SendTextureResult(window_rect.size(),
2240 sync_point)); 2240 texture_mailbox,
2241 request->SendTextureResult(window_rect.size(), texture_mailbox.Pass()); 2241 release_callback.Pass());
2242 return; 2242 return;
2243 } 2243 }
2244 2244
2245 DCHECK(request->force_bitmap_result()); 2245 DCHECK(request->force_bitmap_result());
2246 2246
2247 scoped_ptr<SkBitmap> bitmap(new SkBitmap); 2247 scoped_ptr<SkBitmap> bitmap(new SkBitmap);
2248 bitmap->setConfig(SkBitmap::kARGB_8888_Config, 2248 bitmap->setConfig(SkBitmap::kARGB_8888_Config,
2249 window_rect.width(), 2249 window_rect.width(),
2250 window_rect.height()); 2250 window_rect.height());
2251 bitmap->allocPixels(); 2251 bitmap->allocPixels();
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after
3142 return; 3142 return;
3143 offscreen_context_labelled_ = true; 3143 offscreen_context_labelled_ = true;
3144 std::string unique_context_name = base::StringPrintf( 3144 std::string unique_context_name = base::StringPrintf(
3145 "%s-Offscreen-%p", settings_->compositor_name.c_str(), context_); 3145 "%s-Offscreen-%p", settings_->compositor_name.c_str(), context_);
3146 offscreen_context_provider->Context3d() 3146 offscreen_context_provider->Context3d()
3147 ->pushGroupMarkerEXT(unique_context_name.c_str()); 3147 ->pushGroupMarkerEXT(unique_context_name.c_str());
3148 } 3148 }
3149 3149
3150 3150
3151 } // namespace cc 3151 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698