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

Side by Side Diff: cc/blink/web_external_texture_layer_impl.h

Issue 558083002: [cc] Add nearest neighbor filtering for TextureLayer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to WebExternalTextureLayer::setNearestNeighbor. Created 6 years, 1 month 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 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ 5 #ifndef CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_
6 #define CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ 6 #define CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
11 #include "cc/blink/cc_blink_export.h" 11 #include "cc/blink/cc_blink_export.h"
12 #include "cc/layers/texture_layer_client.h" 12 #include "cc/layers/texture_layer_client.h"
13 #include "third_party/WebKit/public/platform/WebExternalTextureLayer.h" 13 #include "third_party/WebKit/public/platform/WebExternalTextureLayer.h"
14 #include "third_party/skia/include/core/SkPaint.h"
danakj 2014/11/17 17:39:41 unused
jackhou1 2014/11/17 22:46:35 Done.
14 15
15 namespace blink { 16 namespace blink {
16 struct WebFloatRect; 17 struct WebFloatRect;
17 struct WebExternalTextureMailbox; 18 struct WebExternalTextureMailbox;
18 } 19 }
19 20
20 namespace cc { 21 namespace cc {
21 class SingleReleaseCallback; 22 class SingleReleaseCallback;
22 class TextureMailbox; 23 class TextureMailbox;
23 } 24 }
(...skipping 12 matching lines...) Expand all
36 blink::WebExternalTextureLayerClient*); 37 blink::WebExternalTextureLayerClient*);
37 virtual ~WebExternalTextureLayerImpl(); 38 virtual ~WebExternalTextureLayerImpl();
38 39
39 // blink::WebExternalTextureLayer implementation. 40 // blink::WebExternalTextureLayer implementation.
40 virtual blink::WebLayer* layer(); 41 virtual blink::WebLayer* layer();
41 virtual void clearTexture(); 42 virtual void clearTexture();
42 virtual void setOpaque(bool opaque); 43 virtual void setOpaque(bool opaque);
43 virtual void setPremultipliedAlpha(bool premultiplied); 44 virtual void setPremultipliedAlpha(bool premultiplied);
44 virtual void setBlendBackgroundColor(bool blend); 45 virtual void setBlendBackgroundColor(bool blend);
45 virtual void setRateLimitContext(bool rate_limit); 46 virtual void setRateLimitContext(bool rate_limit);
47 virtual void setNearestNeighbor(bool nearest_neighbor);
46 48
47 // TextureLayerClient implementation. 49 // TextureLayerClient implementation.
48 bool PrepareTextureMailbox( 50 bool PrepareTextureMailbox(
49 cc::TextureMailbox* mailbox, 51 cc::TextureMailbox* mailbox,
50 scoped_ptr<cc::SingleReleaseCallback>* release_callback, 52 scoped_ptr<cc::SingleReleaseCallback>* release_callback,
51 bool use_shared_memory) override; 53 bool use_shared_memory) override;
52 54
53 private: 55 private:
54 static void DidReleaseMailbox( 56 static void DidReleaseMailbox(
55 base::WeakPtr<WebExternalTextureLayerImpl> layer, 57 base::WeakPtr<WebExternalTextureLayerImpl> layer,
56 const blink::WebExternalTextureMailbox& mailbox, 58 const blink::WebExternalTextureMailbox& mailbox,
57 WebExternalBitmapImpl* bitmap, 59 WebExternalBitmapImpl* bitmap,
58 unsigned sync_point, 60 unsigned sync_point,
59 bool lost_resource); 61 bool lost_resource);
60 62
61 WebExternalBitmapImpl* AllocateBitmap(); 63 WebExternalBitmapImpl* AllocateBitmap();
62 64
63 blink::WebExternalTextureLayerClient* client_; 65 blink::WebExternalTextureLayerClient* client_;
64 scoped_ptr<WebLayerImpl> layer_; 66 scoped_ptr<WebLayerImpl> layer_;
65 ScopedVector<WebExternalBitmapImpl> free_bitmaps_; 67 ScopedVector<WebExternalBitmapImpl> free_bitmaps_;
66 68
67 DISALLOW_COPY_AND_ASSIGN(WebExternalTextureLayerImpl); 69 DISALLOW_COPY_AND_ASSIGN(WebExternalTextureLayerImpl);
68 }; 70 };
69 71
70 } // namespace cc_blink 72 } // namespace cc_blink
71 73
72 #endif // CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ 74 #endif // CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/blink/web_external_texture_layer_impl.cc » ('j') | cc/output/gl_renderer_draw_cache.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698