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

Side by Side Diff: cc/blink/web_external_bitmap_impl.cc

Issue 1539203002: Switch to standard integer types in cc/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more includes Created 5 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 unified diff | Download patch
« no previous file with comments | « cc/blink/web_external_bitmap_impl.h ('k') | cc/blink/web_external_texture_layer_impl.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/blink/web_external_bitmap_impl.h" 5 #include "cc/blink/web_external_bitmap_impl.h"
6 6
7 #include <stdint.h>
8
7 #include "cc/resources/shared_bitmap.h" 9 #include "cc/resources/shared_bitmap.h"
8 10
9 namespace cc_blink { 11 namespace cc_blink {
10 12
11 namespace { 13 namespace {
12 14
13 SharedBitmapAllocationFunction g_memory_allocator; 15 SharedBitmapAllocationFunction g_memory_allocator;
14 16
15 } // namespace 17 } // namespace
16 18
(...skipping 12 matching lines...) Expand all
29 if (size != size_) { 31 if (size != size_) {
30 shared_bitmap_ = g_memory_allocator(gfx::Size(size)); 32 shared_bitmap_ = g_memory_allocator(gfx::Size(size));
31 size_ = size; 33 size_ = size;
32 } 34 }
33 } 35 }
34 36
35 blink::WebSize WebExternalBitmapImpl::size() { 37 blink::WebSize WebExternalBitmapImpl::size() {
36 return size_; 38 return size_;
37 } 39 }
38 40
39 uint8* WebExternalBitmapImpl::pixels() { 41 uint8_t* WebExternalBitmapImpl::pixels() {
40 if (!shared_bitmap_) { 42 if (!shared_bitmap_) {
41 // crbug.com/520417: not sure why a non-null WebExternalBitmap is 43 // crbug.com/520417: not sure why a non-null WebExternalBitmap is
42 // being passed to prepareMailbox when the shared_bitmap_ is null. 44 // being passed to prepareMailbox when the shared_bitmap_ is null.
43 // Best hypothesis is that the bitmap is zero-sized. 45 // Best hypothesis is that the bitmap is zero-sized.
44 DCHECK(size_.isEmpty()); 46 DCHECK(size_.isEmpty());
45 return nullptr; 47 return nullptr;
46 } 48 }
47 return shared_bitmap_->pixels(); 49 return shared_bitmap_->pixels();
48 } 50 }
49 51
50 } // namespace cc_blink 52 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_external_bitmap_impl.h ('k') | cc/blink/web_external_texture_layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698