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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/gpu/AcceleratedImageBufferSurface.cpp

Issue 1609343004: Add display list fallback reason histograms for 2D canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: git cl web Created 4 years, 10 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
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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 SkAlphaType alphaType = (Opaque == opacityMode) ? kOpaque_SkAlphaType : kPre mul_SkAlphaType; 51 SkAlphaType alphaType = (Opaque == opacityMode) ? kOpaque_SkAlphaType : kPre mul_SkAlphaType;
52 SkImageInfo info = SkImageInfo::MakeN32(size.width(), size.height(), alphaTy pe); 52 SkImageInfo info = SkImageInfo::MakeN32(size.width(), size.height(), alphaTy pe);
53 SkSurfaceProps disableLCDProps(0, kUnknown_SkPixelGeometry); 53 SkSurfaceProps disableLCDProps(0, kUnknown_SkPixelGeometry);
54 m_surface = adoptPtr(SkSurface::NewRenderTarget(grContext, SkSurface::kYes_B udgeted, info, 0 /* sampleCount */, 54 m_surface = adoptPtr(SkSurface::NewRenderTarget(grContext, SkSurface::kYes_B udgeted, info, 0 /* sampleCount */,
55 Opaque == opacityMode ? nullptr : &disableLCDProps)); 55 Opaque == opacityMode ? nullptr : &disableLCDProps));
56 if (!m_surface.get()) 56 if (!m_surface.get())
57 return; 57 return;
58 clear(); 58 clear();
59 } 59 }
60 60
61 PassRefPtr<SkImage> AcceleratedImageBufferSurface::newImageSnapshot(Acceleration Hint) 61 PassRefPtr<SkImage> AcceleratedImageBufferSurface::newImageSnapshot(Acceleration Hint, SnapshotReason)
62 { 62 {
63 return adoptRef(m_surface->newImageSnapshot()); 63 return adoptRef(m_surface->newImageSnapshot());
64 } 64 }
65 65
66 Platform3DObject AcceleratedImageBufferSurface::getBackingTextureHandleForOverwr ite() 66 Platform3DObject AcceleratedImageBufferSurface::getBackingTextureHandleForOverwr ite()
67 { 67 {
68 if (!m_surface) 68 if (!m_surface)
69 return 0; 69 return 0;
70 return m_surface->getTextureHandle(SkSurface::kDiscardWrite_TextureHandleAcc ess); 70 return m_surface->getTextureHandle(SkSurface::kDiscardWrite_TextureHandleAcc ess);
71 } 71 }
72 72
73 } // namespace blink 73 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698