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

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

Issue 464273002: Cleanup namespace usage in platform/graphics/[filters/* to skia/*] and platform/graphics/[B-D]* (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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 | « Source/platform/graphics/DiscardablePixelRef.h ('k') | Source/platform/graphics/DisplayList.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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 , m_rowBytes(rowBytes) 75 , m_rowBytes(rowBytes)
76 { 76 {
77 } 77 }
78 78
79 DiscardablePixelRef::~DiscardablePixelRef() 79 DiscardablePixelRef::~DiscardablePixelRef()
80 { 80 {
81 } 81 }
82 82
83 bool DiscardablePixelRef::allocAndLockDiscardableMemory(size_t bytes) 83 bool DiscardablePixelRef::allocAndLockDiscardableMemory(size_t bytes)
84 { 84 {
85 m_discardable = adoptPtr(blink::Platform::current()->allocateAndLockDiscarda bleMemory(bytes)); 85 m_discardable = adoptPtr(Platform::current()->allocateAndLockDiscardableMemo ry(bytes));
86 if (m_discardable) { 86 if (m_discardable) {
87 m_lockedMemory = m_discardable->data(); 87 m_lockedMemory = m_discardable->data();
88 return true; 88 return true;
89 } 89 }
90 return false; 90 return false;
91 } 91 }
92 92
93 bool DiscardablePixelRef::onNewLockPixels(LockRec* rec) 93 bool DiscardablePixelRef::onNewLockPixels(LockRec* rec)
94 { 94 {
95 if (!m_lockedMemory && m_discardable->lock()) 95 if (!m_lockedMemory && m_discardable->lock())
(...skipping 14 matching lines...) Expand all
110 m_discardable->unlock(); 110 m_discardable->unlock();
111 m_lockedMemory = 0; 111 m_lockedMemory = 0;
112 } 112 }
113 113
114 bool DiscardablePixelRef::isDiscardable(SkPixelRef* pixelRef) 114 bool DiscardablePixelRef::isDiscardable(SkPixelRef* pixelRef)
115 { 115 {
116 return pixelRef && pixelRef->getURI() && !strcmp(pixelRef->getURI(), labelDi scardable); 116 return pixelRef && pixelRef->getURI() && !strcmp(pixelRef->getURI(), labelDi scardable);
117 } 117 }
118 118
119 } // namespace blink 119 } // namespace blink
OLDNEW
« no previous file with comments | « Source/platform/graphics/DiscardablePixelRef.h ('k') | Source/platform/graphics/DisplayList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698