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

Side by Side Diff: dm/DMSrcSinkAndroid.h

Issue 943393002: Add HWUI Sink to DM on Android Framework builds (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove unnecessary SkStringPrintf() calls Created 5 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
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMSrcSinkAndroid.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2015 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef DMSrcSinkAndroid_DEFINED
9 #define DMSrcSinkAndroid_DEFINED
10
11 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
12
13 #include "DMSrcSink.h"
14
15 namespace DM {
16
17 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/
18
19 class HWUISink : public Sink {
20 public:
21 HWUISink() { }
22
23 Error draw(const Src&, SkBitmap*, SkWStream*, SkString*) const SK_OVERRIDE;
24 int enclave() const SK_OVERRIDE { return kGPU_Enclave; }
25 const char* fileExtension() const SK_OVERRIDE { return "png"; }
26
27 private:
28 const float kDensity = 1.0f;
29 inline float dp(int x) const { return x * kDensity; }
30 };
31
32 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/
33
34 } // namespace DM
35
36 #endif // SK_BUILD_FOR_ANDROID_FRAMEWORK
37
38 #endif // DMSrcSinkAndroid_DEFINED
OLDNEW
« no previous file with comments | « dm/DM.cpp ('k') | dm/DMSrcSinkAndroid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698