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

Side by Side Diff: Source/platform/graphics/Canvas2DLayerBridge.cpp

Issue 400543004: Rename WebCore namespace to blink in Platform (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 using blink::WebGraphicsContext3D; 43 using blink::WebGraphicsContext3D;
44 44
45 namespace { 45 namespace {
46 enum { 46 enum {
47 InvalidMailboxIndex = -1, 47 InvalidMailboxIndex = -1,
48 }; 48 };
49 49
50 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, canvas2DLayerBridgeInstance Counter, ("Canvas2DLayerBridge")); 50 DEFINE_DEBUG_ONLY_GLOBAL(WTF::RefCountedLeakCounter, canvas2DLayerBridgeInstance Counter, ("Canvas2DLayerBridge"));
51 } 51 }
52 52
53 namespace WebCore { 53 namespace blink {
54 54
55 static PassRefPtr<SkSurface> createSkSurface(GrContext* gr, const IntSize& size, int msaaSampleCount = 0) 55 static PassRefPtr<SkSurface> createSkSurface(GrContext* gr, const IntSize& size, int msaaSampleCount = 0)
56 { 56 {
57 if (!gr) 57 if (!gr)
58 return nullptr; 58 return nullptr;
59 gr->resetContext(); 59 gr->resetContext();
60 SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height()); 60 SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height());
61 return adoptRef(SkSurface::NewRenderTarget(gr, info, msaaSampleCount)); 61 return adoptRef(SkSurface::NewRenderTarget(gr, info, msaaSampleCount));
62 } 62 }
63 63
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 Canvas2DLayerBridge::MailboxInfo::MailboxInfo(const MailboxInfo& other) { 548 Canvas2DLayerBridge::MailboxInfo::MailboxInfo(const MailboxInfo& other) {
549 // This copy constructor should only be used for Vector reallocation 549 // This copy constructor should only be used for Vector reallocation
550 // Assuming 'other' is to be destroyed, we transfer m_image ownership 550 // Assuming 'other' is to be destroyed, we transfer m_image ownership
551 // rather than do a refcount dance. 551 // rather than do a refcount dance.
552 memcpy(&m_mailbox, &other.m_mailbox, sizeof(m_mailbox)); 552 memcpy(&m_mailbox, &other.m_mailbox, sizeof(m_mailbox));
553 m_image = const_cast<MailboxInfo*>(&other)->m_image.release(); 553 m_image = const_cast<MailboxInfo*>(&other)->m_image.release();
554 m_status = other.m_status; 554 m_status = other.m_status;
555 } 555 }
556 556
557 } 557 }
OLDNEW
« no previous file with comments | « Source/platform/graphics/Canvas2DLayerBridge.h ('k') | Source/platform/graphics/Canvas2DLayerBridgeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698