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

Unified Diff: remoting/base/encoder_vp8.h

Issue 7992011: Move us fully from gfx:: over to skia types for consistency. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix for bad DEPS Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/base/encoder_row_based.cc ('k') | remoting/base/encoder_vp8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/base/encoder_vp8.h
diff --git a/remoting/base/encoder_vp8.h b/remoting/base/encoder_vp8.h
index a74d9f9caa3c2d660780f5c3898882bbe28d21e7..1d145e83d72091688fa94413267342f007682971 100644
--- a/remoting/base/encoder_vp8.h
+++ b/remoting/base/encoder_vp8.h
@@ -9,7 +9,7 @@
#include "base/gtest_prod_util.h"
#include "remoting/base/encoder.h"
-#include "ui/gfx/rect.h"
+#include "third_party/skia/include/core/SkRect.h"
typedef struct vpx_codec_ctx vpx_codec_ctx_t;
typedef struct vpx_image vpx_image_t;
@@ -27,10 +27,12 @@ class EncoderVp8 : public Encoder {
DataAvailableCallback* data_available_callback);
private:
+ typedef std::vector<SkIRect> RectVector;
+
FRIEND_TEST_ALL_PREFIXES(EncoderVp8Test, AlignAndClipRect);
// Initialize the encoder. Returns true if successful.
- bool Init(const gfx::Size& size);
+ bool Init(const SkISize& size);
// Destroy the encoder.
void Destroy();
@@ -38,11 +40,11 @@ class EncoderVp8 : public Encoder {
// Prepare |image_| for encoding. Write updated rectangles into
// |updated_rects|. Returns true if successful.
bool PrepareImage(scoped_refptr<CaptureData> capture_data,
- std::vector<gfx::Rect>* updated_rects);
+ RectVector* updated_rects);
// Update the active map according to |updated_rects|. Active map is then
// given to the encoder to speed up encoding.
- void PrepareActiveMap(const std::vector<gfx::Rect>& updated_rects);
+ void PrepareActiveMap(const RectVector& updated_rects);
// Align the sides of the rectangle to multiples of 2 (expanding outwards),
// but ensuring the result stays within the screen area (width, height).
@@ -50,8 +52,7 @@ class EncoderVp8 : public Encoder {
//
// TODO(lambroslambrou): Pull this out if it's useful for other things than
// VP8-encoding?
- static gfx::Rect AlignAndClipRect(const gfx::Rect& rect,
- int width, int height);
+ static SkIRect AlignAndClipRect(const SkIRect& rect, int width, int height);
// True if the encoder is initialized.
bool initialized_;
@@ -67,7 +68,7 @@ class EncoderVp8 : public Encoder {
scoped_array<uint8> yuv_image_;
// The current frame size.
- gfx::Size size_;
+ SkISize size_;
DISALLOW_COPY_AND_ASSIGN(EncoderVp8);
};
« no previous file with comments | « remoting/base/encoder_row_based.cc ('k') | remoting/base/encoder_vp8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698