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

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

Issue 2523673004: [NOT FOR COMMIT] Fully replace SkCanvas uses.
Patch Set: Support Android build. Created 3 years, 12 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 } 49 }
50 50
51 IntSize size() const override { return m_size; } 51 IntSize size() const override { return m_size; }
52 52
53 sk_sp<SkImage> imageForCurrentFrame() override { return m_image; } 53 sk_sp<SkImage> imageForCurrentFrame() override { return m_image; }
54 54
55 void destroyDecodedData() override { 55 void destroyDecodedData() override {
56 // Image pure virtual stub. 56 // Image pure virtual stub.
57 } 57 }
58 58
59 void draw(SkCanvas*, 59 void draw(CdlCanvas*,
60 const SkPaint&, 60 const CdlPaint&,
61 const FloatRect&, 61 const FloatRect&,
62 const FloatRect&, 62 const FloatRect&,
63 RespectImageOrientationEnum, 63 RespectImageOrientationEnum,
64 ImageClampingMode) override { 64 ImageClampingMode) override {
65 // Image pure virtual stub. 65 // Image pure virtual stub.
66 } 66 }
67 67
68 private: 68 private:
69 TestImage(IntSize size, bool opaque) : Image(0), m_size(size) { 69 TestImage(IntSize size, bool opaque) : Image(0), m_size(size) {
70 sk_sp<SkSurface> surface = createSkSurface(size, opaque); 70 sk_sp<SkSurface> surface = createSkSurface(size, opaque);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 ASSERT_FALSE(graphicsLayer->contentsLayer()); 124 ASSERT_FALSE(graphicsLayer->contentsLayer());
125 125
126 graphicsLayer->setContentsToImage(opaqueImage.get()); 126 graphicsLayer->setContentsToImage(opaqueImage.get());
127 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque()); 127 ASSERT_TRUE(graphicsLayer->contentsLayer()->opaque());
128 128
129 graphicsLayer->setContentsToImage(nonOpaqueImage.get()); 129 graphicsLayer->setContentsToImage(nonOpaqueImage.get());
130 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque()); 130 ASSERT_FALSE(graphicsLayer->contentsLayer()->opaque());
131 } 131 }
132 132
133 } // namespace blink 133 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698