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

Side by Side Diff: cc/resources/texture_mailbox.cc

Issue 1957583002: cc: Add GpuMemoryBufferId to TextureMailbox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: unsigned -> signed Created 4 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
« no previous file with comments | « cc/resources/texture_mailbox.h ('k') | cc/resources/transferable_resource.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/resources/texture_mailbox.h" 5 #include "cc/resources/texture_mailbox.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 13 matching lines...) Expand all
24 24
25 TextureMailbox::TextureMailbox(const gpu::Mailbox& mailbox, 25 TextureMailbox::TextureMailbox(const gpu::Mailbox& mailbox,
26 const gpu::SyncToken& sync_token, 26 const gpu::SyncToken& sync_token,
27 uint32_t target) 27 uint32_t target)
28 : mailbox_holder_(mailbox, sync_token, target), 28 : mailbox_holder_(mailbox, sync_token, target),
29 shared_bitmap_(NULL), 29 shared_bitmap_(NULL),
30 is_overlay_candidate_(false), 30 is_overlay_candidate_(false),
31 secure_output_only_(false), 31 secure_output_only_(false),
32 nearest_neighbor_(false) {} 32 nearest_neighbor_(false) {}
33 33
34 TextureMailbox::TextureMailbox(const gpu::Mailbox& mailbox, 34 TextureMailbox::TextureMailbox(
35 const gpu::SyncToken& sync_token, 35 const gpu::Mailbox& mailbox,
36 uint32_t target, 36 const gpu::SyncToken& sync_token,
37 const gfx::Size& size_in_pixels, 37 uint32_t target,
38 bool is_overlay_candidate, 38 const gfx::Size& size_in_pixels,
39 bool secure_output_only) 39 const gfx::GpuMemoryBufferId& gpu_memory_buffer_id,
40 bool is_overlay_candidate,
41 bool secure_output_only)
40 : mailbox_holder_(mailbox, sync_token, target), 42 : mailbox_holder_(mailbox, sync_token, target),
41 shared_bitmap_(nullptr), 43 shared_bitmap_(nullptr),
42 size_in_pixels_(size_in_pixels), 44 size_in_pixels_(size_in_pixels),
45 gpu_memory_buffer_id_(gpu_memory_buffer_id),
43 is_overlay_candidate_(is_overlay_candidate), 46 is_overlay_candidate_(is_overlay_candidate),
44 secure_output_only_(secure_output_only), 47 secure_output_only_(secure_output_only),
45 nearest_neighbor_(false) { 48 nearest_neighbor_(false) {
46 DCHECK(!is_overlay_candidate || !size_in_pixels.IsEmpty()); 49 DCHECK(!is_overlay_candidate || !size_in_pixels.IsEmpty());
47 } 50 }
48 51
49 TextureMailbox::TextureMailbox(SharedBitmap* shared_bitmap, 52 TextureMailbox::TextureMailbox(SharedBitmap* shared_bitmap,
50 const gfx::Size& size_in_pixels) 53 const gfx::Size& size_in_pixels)
51 : shared_bitmap_(shared_bitmap), 54 : shared_bitmap_(shared_bitmap),
52 size_in_pixels_(size_in_pixels), 55 size_in_pixels_(size_in_pixels),
(...skipping 20 matching lines...) Expand all
73 return !IsValid(); 76 return !IsValid();
74 } 77 }
75 78
76 size_t TextureMailbox::SharedMemorySizeInBytes() const { 79 size_t TextureMailbox::SharedMemorySizeInBytes() const {
77 // UncheckedSizeInBytes is okay because we VerifySizeInBytes in the 80 // UncheckedSizeInBytes is okay because we VerifySizeInBytes in the
78 // constructor and the field is immutable. 81 // constructor and the field is immutable.
79 return SharedBitmap::UncheckedSizeInBytes(size_in_pixels_); 82 return SharedBitmap::UncheckedSizeInBytes(size_in_pixels_);
80 } 83 }
81 84
82 } // namespace cc 85 } // namespace cc
OLDNEW
« no previous file with comments | « cc/resources/texture_mailbox.h ('k') | cc/resources/transferable_resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698