summaryrefslogtreecommitdiffstats
path: root/content/renderer
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-04 22:46:03 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-03-04 22:46:03 +0000
commit1aca0098c408047b8ddedfc306e8b8163b7b4ec2 (patch)
tree34e3cc762575da0f6a0243642a3a8d1dc3dc6773 /content/renderer
parent35fb693d6565cf0435a11d238df29b62c5668315 (diff)
downloadchromium_src-1aca0098c408047b8ddedfc306e8b8163b7b4ec2.zip
chromium_src-1aca0098c408047b8ddedfc306e8b8163b7b4ec2.tar.gz
chromium_src-1aca0098c408047b8ddedfc306e8b8163b7b4ec2.tar.bz2
Move Mailbox from cc to gpu, and its traits to gpu/ipc
Mailbox is safer to IPC than coaxing it into a string, because otherwise we need to validate the size when coming from untrusted sources. This is to enable passing Mailbox through IPC without having to depend on cc. Among others I will need it to move Pepper to mailboxes, and pepper can't depend on cc. BUG=164095 Review URL: https://chromiumcodereview.appspot.com/12378053 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@186006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer')
-rw-r--r--content/renderer/gpu/mailbox_output_surface.cc6
-rw-r--r--content/renderer/gpu/mailbox_output_surface.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/content/renderer/gpu/mailbox_output_surface.cc b/content/renderer/gpu/mailbox_output_surface.cc
index 4e0a863..8d713c8 100644
--- a/content/renderer/gpu/mailbox_output_surface.cc
+++ b/content/renderer/gpu/mailbox_output_surface.cc
@@ -14,7 +14,7 @@
using cc::CompositorFrame;
using cc::GLFrameData;
-using cc::Mailbox;
+using gpu::Mailbox;
using WebKit::WebGraphicsContext3D;
namespace content {
@@ -113,7 +113,7 @@ void MailboxOutputSurface::SendFrameToParentCompositor(
DCHECK(!size_.IsEmpty());
DCHECK(size_ == current_backing_.size);
- DCHECK(!current_backing_.mailbox.isZero());
+ DCHECK(!current_backing_.mailbox.IsZero());
context3d_->framebufferTexture2D(
GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
@@ -132,7 +132,7 @@ void MailboxOutputSurface::SendFrameToParentCompositor(
}
void MailboxOutputSurface::OnSwapAck(const cc::CompositorFrameAck& ack) {
- if (!ack.gl_frame_data->mailbox.isZero()) {
+ if (!ack.gl_frame_data->mailbox.IsZero()) {
DCHECK(!ack.gl_frame_data->size.IsEmpty());
uint32 texture_id = context3d_->createTexture();
TransferableFrame texture(
diff --git a/content/renderer/gpu/mailbox_output_surface.h b/content/renderer/gpu/mailbox_output_surface.h
index 0f5336a..745a812 100644
--- a/content/renderer/gpu/mailbox_output_surface.h
+++ b/content/renderer/gpu/mailbox_output_surface.h
@@ -47,14 +47,14 @@ class MailboxOutputSurface : public CompositorOutputSurface {
: texture_id(0) {}
TransferableFrame(uint32 texture_id,
- const cc::Mailbox& mailbox,
+ const gpu::Mailbox& mailbox,
const gfx::Size size)
: texture_id(texture_id),
mailbox(mailbox),
size(size) {}
uint32 texture_id;
- cc::Mailbox mailbox;
+ gpu::Mailbox mailbox;
gfx::Size size;
};
TransferableFrame current_backing_;