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

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

Issue 2739533003: Revert of Make cc/paint have concrete types (Closed)
Patch Set: Created 3 years, 9 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 WTF_MAKE_NONCOPYABLE(AcceleratedImageBufferSurface); 46 WTF_MAKE_NONCOPYABLE(AcceleratedImageBufferSurface);
47 USING_FAST_MALLOC(AcceleratedImageBufferSurface); 47 USING_FAST_MALLOC(AcceleratedImageBufferSurface);
48 48
49 public: 49 public:
50 AcceleratedImageBufferSurface(const IntSize&, 50 AcceleratedImageBufferSurface(const IntSize&,
51 OpacityMode = NonOpaque, 51 OpacityMode = NonOpaque,
52 sk_sp<SkColorSpace> = nullptr, 52 sk_sp<SkColorSpace> = nullptr,
53 SkColorType = kN32_SkColorType); 53 SkColorType = kN32_SkColorType);
54 ~AcceleratedImageBufferSurface() override {} 54 ~AcceleratedImageBufferSurface() override {}
55 55
56 PaintCanvas* canvas() override { return m_canvas.get(); } 56 PaintCanvas* canvas() override {
57 return m_surface ? m_surface->getCanvas() : nullptr;
58 }
57 bool isValid() const override; 59 bool isValid() const override;
58 bool isAccelerated() const override { return true; } 60 bool isAccelerated() const override { return true; }
59 sk_sp<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason) override; 61 sk_sp<SkImage> newImageSnapshot(AccelerationHint, SnapshotReason) override;
60 GLuint getBackingTextureHandleForOverwrite() override; 62 GLuint getBackingTextureHandleForOverwrite() override;
61 63
62 private: 64 private:
63 unsigned m_contextId; 65 unsigned m_contextId;
64 sk_sp<SkSurface> m_surface; // Uses m_contextProvider. 66 sk_sp<PaintSurface> m_surface; // Uses m_contextProvider.
65 std::unique_ptr<PaintCanvas> m_canvas;
66 }; 67 };
67 68
68 } // namespace blink 69 } // namespace blink
69 70
70 #endif 71 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698