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

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.h

Issue 12220110: Set the device scale factor from the compositor interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dp -> DIP Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 29 matching lines...) Expand all
40 static bool IsInitialized(); 40 static bool IsInitialized();
41 static bool IsThreadingEnabled(); 41 static bool IsThreadingEnabled();
42 42
43 // Returns true if initialized with DIRECT_CONTEXT_ON_DRAW_THREAD. 43 // Returns true if initialized with DIRECT_CONTEXT_ON_DRAW_THREAD.
44 static bool UsesDirectGL(); 44 static bool UsesDirectGL();
45 45
46 // Compositor implementation. 46 // Compositor implementation.
47 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) OVERRIDE; 47 virtual void SetRootLayer(scoped_refptr<cc::Layer> root) OVERRIDE;
48 virtual void SetWindowSurface(ANativeWindow* window) OVERRIDE; 48 virtual void SetWindowSurface(ANativeWindow* window) OVERRIDE;
49 virtual void SetVisible(bool visible) OVERRIDE; 49 virtual void SetVisible(bool visible) OVERRIDE;
50 virtual void setDeviceScaleFactor(float factor) OVERRIDE;
50 virtual void SetWindowBounds(const gfx::Size& size) OVERRIDE; 51 virtual void SetWindowBounds(const gfx::Size& size) OVERRIDE;
51 virtual void SetHasTransparentBackground(bool flag) OVERRIDE; 52 virtual void SetHasTransparentBackground(bool flag) OVERRIDE;
52 virtual bool CompositeAndReadback( 53 virtual bool CompositeAndReadback(
53 void *pixels, const gfx::Rect& rect) OVERRIDE; 54 void *pixels, const gfx::Rect& rect) OVERRIDE;
54 virtual void Composite() OVERRIDE; 55 virtual void Composite() OVERRIDE;
55 virtual WebKit::WebGLId GenerateTexture(gfx::JavaBitmap& bitmap) OVERRIDE; 56 virtual WebKit::WebGLId GenerateTexture(gfx::JavaBitmap& bitmap) OVERRIDE;
56 virtual WebKit::WebGLId GenerateCompressedTexture( 57 virtual WebKit::WebGLId GenerateCompressedTexture(
57 gfx::Size& size, int data_size, void* data) OVERRIDE; 58 gfx::Size& size, int data_size, void* data) OVERRIDE;
58 virtual void DeleteTexture(WebKit::WebGLId texture_id) OVERRIDE; 59 virtual void DeleteTexture(WebKit::WebGLId texture_id) OVERRIDE;
59 virtual bool CopyTextureToBitmap(WebKit::WebGLId texture_id, 60 virtual bool CopyTextureToBitmap(WebKit::WebGLId texture_id,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 101
101 Compositor::Client* client_; 102 Compositor::Client* client_;
102 base::WeakPtrFactory<CompositorImpl> weak_factory_; 103 base::WeakPtrFactory<CompositorImpl> weak_factory_;
103 104
104 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); 105 DISALLOW_COPY_AND_ASSIGN(CompositorImpl);
105 }; 106 };
106 107
107 } // namespace content 108 } // namespace content
108 109
109 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 110 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698