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

Unified Diff: cc/resources/resource_provider.cc

Issue 801973002: Introduce CompositorDependencies for RenderWidgetCompositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: compdep: . Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/test/fake_external_begin_frame_source.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/resource_provider.cc
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 5b8bcd2263e275cf5ef807d7e649b35c2e076356..9c2e4a0d1392807d6197b74655cdb09180d92a5a 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -555,17 +555,9 @@ ResourceProvider::ResourceId ResourceProvider::CreateBitmap(
const gfx::Size& size, GLint wrap_mode) {
DCHECK(thread_checker_.CalledOnValidThread());
- scoped_ptr<SharedBitmap> bitmap;
- if (shared_bitmap_manager_)
- bitmap = shared_bitmap_manager_->AllocateSharedBitmap(size);
-
- uint8_t* pixels;
- if (bitmap) {
- pixels = bitmap->pixels();
- } else {
- size_t bytes = SharedBitmap::CheckedSizeInBytes(size);
- pixels = new uint8_t[bytes];
- }
+ scoped_ptr<SharedBitmap> bitmap =
+ shared_bitmap_manager_->AllocateSharedBitmap(size);
+ uint8_t* pixels = bitmap->pixels();
DCHECK(pixels);
ResourceId id = next_id_++;
« no previous file with comments | « cc/cc_tests.gyp ('k') | cc/test/fake_external_begin_frame_source.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698